aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/broeuschmeul/android/gps/bluetooth
diff options
context:
space:
mode:
authorHerbert von Broeuschmeul <Herbert.Broeuschmeul@gmail.com>2010-09-22 20:51:51 +0200
committerHerbert von Broeuschmeul <Herbert.Broeuschmeul@gmail.com>2010-09-22 20:51:51 +0200
commite04d8c993fc79fe9394b5d6938484037c11ed0c3 (patch)
tree6ba4c7379dce1361214c31c4d1b23586f102acbc /src/org/broeuschmeul/android/gps/bluetooth
parent987fa33bf9ccb4afcc4504555616bc52d3ec1a79 (diff)
downloadBlueGPS-e04d8c993fc79fe9394b5d6938484037c11ed0c3.zip
BlueGPS-e04d8c993fc79fe9394b5d6938484037c11ed0c3.tar.gz
BlueGPS-e04d8c993fc79fe9394b5d6938484037c11ed0c3.tar.bz2
add status notification
change mockGps status to * LocationProvider.TEMPORARILY_UNAVAILABLE, * LocationProvider.OUT_OF_SERVICE, * LocationProvider.AVAILABLE when the gps loses the fix or when the connection is lost or ... Remark: on the Galaxy S it doesn't work :( * either LocationManager.setTestProviderStatus is not used properly * either the method is buggy
Diffstat (limited to 'src/org/broeuschmeul/android/gps/bluetooth')
-rw-r--r--src/org/broeuschmeul/android/gps/bluetooth/provider/BlueetoothGpsManager.java24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/org/broeuschmeul/android/gps/bluetooth/provider/BlueetoothGpsManager.java b/src/org/broeuschmeul/android/gps/bluetooth/provider/BlueetoothGpsManager.java
index 6ea58bf..d156e82 100644
--- a/src/org/broeuschmeul/android/gps/bluetooth/provider/BlueetoothGpsManager.java
+++ b/src/org/broeuschmeul/android/gps/bluetooth/provider/BlueetoothGpsManager.java
@@ -42,6 +42,7 @@ import android.bluetooth.BluetoothSocket;
import android.content.Context;
import android.location.LocationManager;
import android.location.GpsStatus.NmeaListener;
+import android.os.Bundle;
import android.util.Log;
public class BlueetoothGpsManager {
@@ -83,6 +84,7 @@ public class BlueetoothGpsManager {
}
} catch (IOException e) {
Log.e("BT test", "error while getting data", e);
+ setMockLocationProviderOutOfService();
} finally {
disable();
}
@@ -277,6 +279,11 @@ public class BlueetoothGpsManager {
return mockLocationProvider;
}
+ private void setMockLocationProviderOutOfService(){
+ if (parser != null){
+ parser.setMockLocationProviderOutOfService();
+ }
+ }
public boolean addNmeaListener(NmeaListener listener){
if (!nmeaListeners.contains(listener)){
@@ -304,5 +311,20 @@ public class BlueetoothGpsManager {
}
}
}
- }
+ }
+
+ public void sendPackagedNmeaCommand(String s){
+ }
+ public void sendPackagedSirfCommand(String s){
+ }
+ public void sendNmeaCommand(String s){
+ if (isEnabled()){
+
+ }
+ }
+ public void sendSirfCommand(String payload){
+ if (isEnabled()){
+
+ }
+ }
}