Merge branch 'master' of git@github.com:filmaj/phonegap

This commit is contained in:
Fil Maj 2009-07-21 16:40:53 -07:00
commit 2c08e3ddcd
2 changed files with 9 additions and 1 deletions

View File

@ -44,7 +44,13 @@ public class GeoListener {
void fail() void fail()
{ {
// Do we need to know why? How would we handle this? // Do we need to know why? How would we handle this?
mAppView.loadUrl("javascript:GeoLocation.fail(" + id + ")"); if (id != "global") {
mAppView.loadUrl("javascript:Geolocation.fail(" + id + ")");
}
else
{
mAppView.loadUrl("javascript:Geolocation.fail()");
}
} }
// This stops the listener // This stops the listener

View File

@ -54,6 +54,7 @@ public class GpsListener implements LocationListener {
public void onProviderDisabled(String provider) { public void onProviderDisabled(String provider) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
Log.d(LOG_TAG, "The provider " + provider + " is disabled"); Log.d(LOG_TAG, "The provider " + provider + " is disabled");
owner.fail();
} }
public void onProviderEnabled(String provider) { public void onProviderEnabled(String provider) {
@ -68,6 +69,7 @@ public class GpsListener implements LocationListener {
if(status == 0) if(status == 0)
{ {
Log.d(LOG_TAG, provider + " is OUT OF SERVICE"); Log.d(LOG_TAG, provider + " is OUT OF SERVICE");
owner.fail();
} }
else if(status == 1) else if(status == 1)
{ {