Accelorometer
- 1. Get reference to a sensor manager: getSystemService(context.SENSOR_SERVICE)
- 2. Access to a specific sensor: SensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER)
- 3. Implent a sensor event listener:
- onAccuracyChange()
- onSensorChanged()
- 4. registerListener()
- 5. unregisterListener()
No comments:
Post a Comment