mirror of
https://github.com/apache/cordova-android.git
synced 2026-04-23 00:00:09 +08:00
Merged imhotep`s changes, still need to fix droidgap and the android shell call on Windows vs. other OSes.
This commit is contained in:
@@ -21,6 +21,7 @@ public class GeoBroker {
|
||||
{
|
||||
mCtx = ctx;
|
||||
mAppView = view;
|
||||
geoListeners = new HashMap<String, GeoListener>();
|
||||
}
|
||||
|
||||
public void getCurrentLocation()
|
||||
|
||||
@@ -47,7 +47,7 @@ public class GeoListener {
|
||||
params += "," + loc.getSpeed() + "," + loc.getTime();
|
||||
if(id != "global")
|
||||
{
|
||||
mAppView.loadUrl("javascript:navigator.geolocation.success(" + id + "," + params + ")");
|
||||
mAppView.loadUrl("javascript:navigator._geo.success(" + id + "," + params + ")");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,11 +55,11 @@ public class GeoListener {
|
||||
{
|
||||
// Do we need to know why? How would we handle this?
|
||||
if (id != "global") {
|
||||
mAppView.loadUrl("javascript:navigator.geolocation.fail(" + id + ")");
|
||||
mAppView.loadUrl("javascript:navigator._geo.fail(" + id + ")");
|
||||
}
|
||||
else
|
||||
{
|
||||
mAppView.loadUrl("javascript:navigator.geolocation.fail()");
|
||||
mAppView.loadUrl("javascript:navigator._geo.fail()");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ public class PhoneGap{
|
||||
* UUID, version and availability
|
||||
*/
|
||||
public boolean droid = true;
|
||||
public static String version = "0.8.0";
|
||||
public static String version = "0.9.99999";
|
||||
public static String platform = "Android";
|
||||
public static String uuid;
|
||||
private Context mCtx;
|
||||
|
||||
@@ -70,11 +70,9 @@ public class WebViewReflect {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
//setting.setDatabaseEnabled(enable);
|
||||
//setting.setDatabasePath(path);
|
||||
} else {
|
||||
/* feature not supported, do something else */
|
||||
System.out.println("dump not supported");
|
||||
System.out.println("Database not supported");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,11 +93,9 @@ public class WebViewReflect {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
//setting.setDatabaseEnabled(enable);
|
||||
//setting.setDatabasePath(path);
|
||||
} else {
|
||||
/* feature not supported, do something else */
|
||||
System.out.println("dump not supported");
|
||||
System.out.println("DOM Storage not supported");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user