@Implements(value=android.hardware.SensorManager.class) public class ShadowSensorManager extends Object
SensorManager.| Modifier and Type | Field and Description |
|---|---|
boolean |
forceListenersToFail |
| Constructor and Description |
|---|
ShadowSensorManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addSensor(int sensorType,
android.hardware.Sensor sensor)
Provide a Sensor for the indicated sensor type.
|
android.hardware.SensorEvent |
createSensorEvent() |
android.hardware.Sensor |
getDefaultSensor(int type) |
boolean |
hasListener(android.hardware.SensorEventListener listener) |
boolean |
registerListener(android.hardware.SensorEventListener listener,
android.hardware.Sensor sensor,
int rate) |
void |
unregisterListener(android.hardware.SensorEventListener listener) |
void |
unregisterListener(android.hardware.SensorEventListener listener,
android.hardware.Sensor sensor) |
public void addSensor(int sensorType,
android.hardware.Sensor sensor)
sensorType - from Sensor constantssensor - Sensor instance@Implementation public android.hardware.Sensor getDefaultSensor(int type)
@Implementation
public boolean registerListener(android.hardware.SensorEventListener listener,
android.hardware.Sensor sensor,
int rate)
@Implementation
public void unregisterListener(android.hardware.SensorEventListener listener,
android.hardware.Sensor sensor)
@Implementation public void unregisterListener(android.hardware.SensorEventListener listener)
public boolean hasListener(android.hardware.SensorEventListener listener)
public android.hardware.SensorEvent createSensorEvent()
Copyright © 2015. All rights reserved.