How does an Android API get data from hardware? For example, how does the getX() function get the x-axis value from the accelerometer sensor?
How does an Android API get data from hardware? For example, how does the
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Overly broad question: it varies depending on hardware data source. In the case of the example you picked, there is a native service that handles the JNI calls for Sensors (see here): this fetches the data from a file descriptor that the hardware driver feeds.