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() |
getContext
connected, disconnected, getCallback, getTag, handleMessage, setCallback, waitForCallback
public PhoneSensorSource(SourceCallback callback, android.content.Context context)
public PhoneSensorSource(android.content.Context context)
public void run()
run
in interface java.lang.Runnable
public void stop()
BaseVehicleDataSource
stop
in interface VehicleDataSource
stop
in class BaseVehicleDataSource
public void onSensorChanged(android.hardware.SensorEvent event)
onSensorChanged
in interface android.hardware.SensorEventListener
public void onStatusChanged(java.lang.String provider, int status, android.os.Bundle extras)
onStatusChanged
in interface android.location.LocationListener
public void onProviderEnabled(java.lang.String provider)
onProviderEnabled
in interface android.location.LocationListener
public void onProviderDisabled(java.lang.String provider)
onProviderDisabled
in interface android.location.LocationListener
public boolean isConnected()
VehicleDataSource
isConnected
in interface VehicleDataSource
isConnected
in class BaseVehicleDataSource
public void onPipelineActivated()
onPipelineActivated
in interface DataPipeline.Operator
onPipelineActivated
in class BaseVehicleDataSource
public void onPipelineDeactivated()
onPipelineDeactivated
in interface DataPipeline.Operator
onPipelineDeactivated
in class BaseVehicleDataSource
public java.lang.String toString()
toString
in class java.lang.Object
public void onAccuracyChanged(android.hardware.Sensor sensor, int i)
onAccuracyChanged
in interface android.hardware.SensorEventListener
public void onLocationChanged(android.location.Location location)
onLocationChanged
in interface android.location.LocationListener