Sensors
There are three types:
- Motion
- Position
- Environment
ServiceManager
- Get a reference with
- getSystemService(Context.SENSOR_SERVICE)
- Get a specific sensor
- SensorManager.getDefaultSensor(int type)
- Sensor Types
- Sensor.TYPE_ACCELEROMETER
- Sensor.TYPE_MAGNETIC_FIELD
- Sensor.TYPE_PRESSURE
SensorEventListener
- Interface for SensorEvent callback
- When the accuracy has changed
- onAccuracyChanged()
- When has a new value
- onSensorChanged()
SensorManager
- To register or unregister SensorEvents
- registerListener()
- unregisterListener()
SensorEvents
- Include
- Data is sensor
- Sensor Type
- time-stamp
- Accuracy
- Measurement data
Filters
- Low-pass
- Deemphasize transient force changes
- Emphasize constant force components
- Example
- Carpenter's level
- High-pass
- Emphasize transient force changes
- Deemphasize constant force components
- Example
- Percussion instrument
Comentarios
Publicar un comentario