Added explicit disabling of native Geolocation object in the web client, added a fallback measure to JavaScript geolocation PhoneGap constructor so that it builds/proxies the the instantiated Geo objects properly if it still does exist.

This commit is contained in:
filmaj
2010-03-23 16:37:30 -07:00
parent 655c6ac130
commit 887ab4a28b
3 changed files with 41 additions and 15 deletions
+3 -1
View File
@@ -101,7 +101,6 @@ public class DroidGap extends Activity {
settings.setJavaScriptEnabled(true);
settings.setJavaScriptCanOpenWindowsAutomatically(true);
settings.setLayoutAlgorithm(LayoutAlgorithm.NORMAL);
Package pack = this.getClass().getPackage();
String appPackage = pack.getName();
@@ -111,6 +110,9 @@ public class DroidGap extends Activity {
// Turn on DOM storage!
WebViewReflect.setDomStorage(settings);
// Turn off native geolocation object in browser - we use our own :)
WebViewReflect.setGeolocationEnabled(settings, false);
/* Bind the appView object to the gap class methods */
bindBrowser(appView);
if(cupcakeStorage != null)