public class

VehicleLocationProvider

extends Object
implements Measurement.Listener
java.lang.Object
   ↳ com.openxc.VehicleLocationProvider

Class Overview

Propagate GPS and vehicle speed updates from OpenXC to the normal Android location system. If we have at least latitude, longitude and vehicle speed from the vehicle, we send out a new location for the LocationManager.GPS_PROVIDER and VEHICLE_LOCATION_PROVIDER providers in the Android location service. Developers can either use the standard Android location framework with vehicle locations enabled in OpenXC, or the specific OpenXC Latitude/Longitude measurements directly.

Summary

Constants
String TAG
String VEHICLE_LOCATION_PROVIDER
Public Constructors
VehicleLocationProvider(Context context, VehicleManager vehicleManager)
Public Methods
void receive(Measurement measurement)
void setOverwritingStatus(boolean enabled)
Enable or disable overwriting Android's native GPS values with those from the vehicle.
void stop()
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.openxc.measurements.Measurement.Listener

Constants

public static final String TAG

Constant Value: "VehicleLocationProvider"

public static final String VEHICLE_LOCATION_PROVIDER

Constant Value: "vehicle"

Public Constructors

public VehicleLocationProvider (Context context, VehicleManager vehicleManager)

Public Methods

public void receive (Measurement measurement)

public void setOverwritingStatus (boolean enabled)

Enable or disable overwriting Android's native GPS values with those from the vehicle. If enabled, the GPS_PROVIDER from Android will respond with data taken from the vehicle interface. The native GPS values will be used until GPS data is actually received from the vehicle, so if the specific car you're plugged into doesn't have GPS then the values will not be overwritten, regardless of this setting.

public void stop ()

public String toString ()