public abstract class SKAbstractSensor extends java.lang.Object implements SKSensorInterface
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
isSensing |
protected Context |
mApplicationContext |
protected java.util.ArrayList<SKSensorDataListener> |
mSensorDataListeners |
protected SKSensorType |
mSensorType |
| Modifier | Constructor and Description |
|---|---|
protected |
SKAbstractSensor(Context context,
SKSensorType sensorType) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getSensorName() |
SKSensorType |
getSensorType() |
boolean |
isSensing() |
protected abstract boolean |
shouldPostSensorData(SKAbstractData data) |
protected void |
submitSensorData(SKAbstractData data) |
void |
subscribeSensorDataListener(SKSensorDataListener callback) |
void |
unsubscribeAllSensorDataListeners() |
void |
unsubscribeSensorDataListener(SKSensorDataListener callback) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitstartSensing, stopSensingprotected final Context mApplicationContext
protected final SKSensorType mSensorType
protected boolean isSensing
protected java.util.ArrayList<SKSensorDataListener> mSensorDataListeners
protected SKAbstractSensor(Context context,
SKSensorType sensorType)
public boolean isSensing()
isSensing in interface SKSensorInterfacepublic SKSensorType getSensorType()
getSensorType in interface SKSensorInterfacepublic java.lang.String getSensorName()
throws SKException
SKExceptionpublic void subscribeSensorDataListener(SKSensorDataListener callback) throws SKException
subscribeSensorDataListener in interface SKSensorInterfaceSKExceptionpublic void unsubscribeSensorDataListener(SKSensorDataListener callback) throws SKException
unsubscribeSensorDataListener in interface SKSensorInterfaceSKExceptionpublic void unsubscribeAllSensorDataListeners()
throws SKException
unsubscribeAllSensorDataListeners in interface SKSensorInterfaceSKExceptionprotected abstract boolean shouldPostSensorData(SKAbstractData data)
protected void submitSensorData(SKAbstractData data)