public class OrientationSensorListener
extends java.lang.Object
SensorEventListener
Constructor and Description |
---|
OrientationSensorListener(Device device) |
OrientationSensorListener(DeviceOrientation deviceOrientation) |
Modifier and Type | Method and Description |
---|---|
void |
enableSensorService(Context context)
Enable the sensor service by the context
|
ESensorDelayType |
getDelay() |
boolean |
isAcclerometerActivated() |
boolean |
isGyroscopeActivated() |
boolean |
isMagneticFieldActivated() |
void |
onAccuracyChanged(Sensor sensor,
int accuracy)
Not implemented
|
void |
onSensorChanged(SensorEvent event) |
void |
setDelay(ESensorDelayType delay) |
public OrientationSensorListener(DeviceOrientation deviceOrientation)
deviceOrientation
- it will be updated by the listenerpublic OrientationSensorListener(Device device)
device
- its attribute deviceOrientation will be updated by the listenerpublic void enableSensorService(Context context)
context
- public ESensorDelayType getDelay()
public void setDelay(ESensorDelayType delay)
public boolean isAcclerometerActivated()
public boolean isGyroscopeActivated()
public boolean isMagneticFieldActivated()
public void onAccuracyChanged(Sensor sensor, int accuracy)
public void onSensorChanged(SensorEvent event)
SensorEventListener