public class

NativeLocationSource

extends ContextualVehicleDataSource
implements LocationListener Runnable
java.lang.Object
   ↳ com.openxc.sources.BaseVehicleDataSource
     ↳ com.openxc.sources.ContextualVehicleDataSource
       ↳ com.openxc.sources.NativeLocationSource

Class Overview

Generate location measurements based on native GPS updates. This source listens for GPS location updates from the built-in Android location framework and passes them to the OpenXC vehicle measurement framework as if they originated from the vehicle. This source is useful to seamlessly use location in an application regardless of it the vehicle has built-in GPS. The ACCESS_FINE_LOCATION permission is required to use this source.

Summary

Public Constructors
NativeLocationSource(SourceCallback callback, Context context)
NativeLocationSource(Context context)
Public Methods
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 onLocationChanged(Location location)
void onPipelineActivated()
void onPipelineDeactivated()
void onProviderDisabled(String provider)
void onProviderEnabled(String provider)
void onStatusChanged(String provider, int status, Bundle extras)
void run()
void stop()
Clear the callback so no further updates are sent.
String toString()
[Expand]
Inherited Methods
From class com.openxc.sources.ContextualVehicleDataSource
From class com.openxc.sources.BaseVehicleDataSource
From class java.lang.Object
From interface android.location.LocationListener
From interface com.openxc.DataPipeline.Operator
From interface com.openxc.sources.VehicleDataSource
From interface java.lang.Runnable

Public Constructors

public NativeLocationSource (SourceCallback callback, Context context)

public NativeLocationSource (Context context)

Public Methods

public 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. The source is capable of providing new vehicle data. Returns true if connected, false otherwise.

public void onLocationChanged (Location location)

public void onPipelineActivated ()

public void onPipelineDeactivated ()

public void onProviderDisabled (String provider)

public void onProviderEnabled (String provider)

public void onStatusChanged (String provider, int status, Bundle extras)

public void run ()

public void stop ()

Clear the callback so no further updates are sent. Subclasses should be sure to call super.stop() so they also stop sending updates when killed by a user.

public String toString ()