public interface SensorEventListener
Modifier and Type | Method and Description |
---|---|
void |
onAccuracyChanged(Sensor sensor,
int accuracy)
Called when the accuracy of the registered sensor has changed.
|
void |
onSensorChanged(SensorEvent event)
Called when there is a new sensor event.
|
void onSensorChanged(SensorEvent event)
See SensorManager
for details on possible sensor types.
See also SensorEvent
.
NOTE: The application doesn't own the
event
object passed as a parameter and therefore cannot hold on to it.
The object may be part of an internal pool and may be reused by
the framework.
event
- the SensorEvent
.void onAccuracyChanged(Sensor sensor, int accuracy)
See the SENSOR_STATUS_* constants in
SensorManager
for details.
accuracy
- The new accuracy of this sensor, one of
SensorManager.SENSOR_STATUS_*