public class PhoneSensorSource extends ContextualVehicleDataSource implements android.hardware.SensorEventListener, android.location.LocationListener, java.lang.Runnable
| Constructor and Description |
|---|
PhoneSensorSource(android.content.Context context) |
PhoneSensorSource(SourceCallback callback,
android.content.Context context) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isConnected()
Return true if the data source is actively connected to its target, be it
a USB endpoint, a Bluetooth channel, a trace file, etc.
|
void |
onAccuracyChanged(android.hardware.Sensor sensor,
int i) |
void |
onLocationChanged(android.location.Location location) |
void |
onPipelineActivated() |
void |
onPipelineDeactivated() |
void |
onProviderDisabled(java.lang.String provider) |
void |
onProviderEnabled(java.lang.String provider) |
void |
onSensorChanged(android.hardware.SensorEvent event) |
void |
onStatusChanged(java.lang.String provider,
int status,
android.os.Bundle extras) |
void |
run() |
void |
stop()
Clear the callback so no further updates are sent.
|
java.lang.String |
toString() |
getContextconnected, disconnected, getCallback, getTag, handleMessage, setCallback, waitForCallbackpublic PhoneSensorSource(SourceCallback callback, android.content.Context context)
public PhoneSensorSource(android.content.Context context)
public void run()
run in interface java.lang.Runnablepublic void stop()
BaseVehicleDataSourcestop in interface VehicleDataSourcestop in class BaseVehicleDataSourcepublic void onSensorChanged(android.hardware.SensorEvent event)
onSensorChanged in interface android.hardware.SensorEventListenerpublic void onStatusChanged(java.lang.String provider,
int status,
android.os.Bundle extras)
onStatusChanged in interface android.location.LocationListenerpublic void onProviderEnabled(java.lang.String provider)
onProviderEnabled in interface android.location.LocationListenerpublic void onProviderDisabled(java.lang.String provider)
onProviderDisabled in interface android.location.LocationListenerpublic boolean isConnected()
VehicleDataSourceisConnected in interface VehicleDataSourceisConnected in class BaseVehicleDataSourcepublic void onPipelineActivated()
onPipelineActivated in interface DataPipeline.OperatoronPipelineActivated in class BaseVehicleDataSourcepublic void onPipelineDeactivated()
onPipelineDeactivated in interface DataPipeline.OperatoronPipelineDeactivated in class BaseVehicleDataSourcepublic java.lang.String toString()
toString in class java.lang.Objectpublic void onAccuracyChanged(android.hardware.Sensor sensor,
int i)
onAccuracyChanged in interface android.hardware.SensorEventListenerpublic void onLocationChanged(android.location.Location location)
onLocationChanged in interface android.location.LocationListener