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 a 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 a sensor has changed.

See SensorManager for details.

Parameters
accuracy The new accuracy of this sensor

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 the SensorEvent.