public class GPSManager
extends java.lang.Object
ACCESS_FINE_LOCATION
permission in your applications 'AndroidManifest.xml' file.
To create an instance of this class do the following:
GPSManager gpsManager = new GPSManager((LocationManager, useNMEA) getSystemService(LOCATION_SERVICE));
gpsManager.openGPSDevice("/mnt/sdcard/italy_gps.log");
gpsManager.openGPSDevice(null);
getCurrentPosition()
. Modifier and Type | Field and Description |
---|---|
protected boolean |
jniCMemOwn |
protected long |
jniCPtr |
com.ptvag.navigation.sdk.NativeObject |
parent |
Modifier and Type | Method and Description |
---|---|
void |
closeGPSDevice()
Closes the GPS-Device.
|
void |
delete()
Kills rubbish if owning the object.
|
protected void |
finalize() |
static long |
getCPtr(com.ptvag.navigation.sdk.NativeObject obj) |
GPSData |
getCurrentPosition()
Retrieves the current GPS-Information.
|
static GPSManager |
getInstance() |
void |
openGPSDevice(boolean shortTimeExtrapolator)
Opens a real GPS-Device
|
void |
openSimulatedGPSDevice(boolean shortTimeExtrapolator,
java.io.File simFilePath)
Opens a simulated GPS-Device
|
void |
openSimulatedGPSDevice(boolean shortTimeExtrapolator,
java.lang.String simFilename)
Opens a simulated GPS-Device
|
void |
pushLocation(android.location.Location location) |
protected long jniCPtr
protected boolean jniCMemOwn
public com.ptvag.navigation.sdk.NativeObject parent
public static GPSManager getInstance()
public GPSData getCurrentPosition() throws NavigationException
NavigationException
public void openGPSDevice(boolean shortTimeExtrapolator) throws NavigationException
shortTimeExtrapolator
- - Enable short time extrapolator for
getting extrapolated gps results within one second when not getting
any gps data
real GPS receiver is used.NavigationException
public void openSimulatedGPSDevice(boolean shortTimeExtrapolator, java.lang.String simFilename) throws NavigationException
shortTimeExtrapolator
- - Enable short time extrapolator for
getting extrapolated gps results within one second when not getting
any gps datasimFilename
- - Name of simulation file. If null
the
real GPS receiver is used.NavigationException
public void openSimulatedGPSDevice(boolean shortTimeExtrapolator, java.io.File simFilePath) throws NavigationException
shortTimeExtrapolator
- - Enable short time extrapolator for
getting extrapolated gps results within one second when not getting
any gps datasimFilePath
- - Path to simulation file. If null
the
real GPS receiver is used.NavigationException
public void closeGPSDevice() throws NavigationException
NavigationException
public void pushLocation(android.location.Location location)
public static long getCPtr(com.ptvag.navigation.sdk.NativeObject obj)
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public void delete()