Android APIs
Added in API level 3
public interface

SensorEventListener

android.hardware.SensorEventListener
Known Indirect Subclasses

Class Overview

Used for receiving notifications from the SensorManager when sensor values have changed.

Summary

Public Methods
abstract void onAccuracyChanged(Sensor sensor, int accuracy)
Called when the accuracy of the registered sensor has changed.
abstract void onSensorChanged(SensorEvent event)
Called when sensor values have changed.

Public Methods

public abstract void onAccuracyChanged (Sensor sensor, int accuracy)

Added in API level 3

Called when the accuracy of the registered sensor has changed.

See the SENSOR_STATUS_* constants in SensorManager for details.

Parameters
sensor Sensor
accuracy int: The new accuracy of this sensor, one of SensorManager.SENSOR_STATUS_*

public abstract void onSensorChanged (SensorEvent event)

Added in API level 3

Called when sensor values have changed.

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.

Parameters
event SensorEvent: the SensorEvent.