March 2016
Intermediate to advanced
428 pages
9h 2m
English
Android includes support for hardware sensors using the Android Sensor Framework. The framework includes the following classes and interfaces:
SensorManagerSensorSensorEventListenerSensorEventMost Android devices include hardware sensors, but they vary greatly between different manufacturers and models. If your application utilizes sensors, you have two choices:
To specify your application uses a sensor, include the <uses-feature> declaration in the Android Manifest. Here is an example requiring a compass to be available:
<uses-feature android:name="android.hardware.sensor.compass" android:required="true"/> ...
Read now
Unlock full access