org.openintents.hardware
Class SensorEventListener

java.lang.Object
  extended by org.openintents.hardware.SensorEventListener

public class SensorEventListener
extends java.lang.Object

Listens to sensor events by binding to a central Sensor service.

Author:
Peli

Nested Class Summary
static interface SensorEventListener.OnSensorListener
          Interface definition for a callback to be invoked when a sensor event is dispatched.
 
Constructor Summary
SensorEventListener(Context context)
           
 
Method Summary
 void bindService()
           
 boolean isBound()
           
 void setOnSensorListener(SensorEventListener.OnSensorListener sensorListener)
          Register a callback to be invoked when the sensor state changes.
 void unbindService()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SensorEventListener

public SensorEventListener(Context context)
Method Detail

bindService

public void bindService()

unbindService

public void unbindService()

isBound

public boolean isBound()

setOnSensorListener

public void setOnSensorListener(SensorEventListener.OnSensorListener sensorListener)
Register a callback to be invoked when the sensor state changes.

Parameters:
sensorListener - The callback that will run or null to unregister.