mirror of
https://github.com/apache/cordova-android.git
synced 2026-05-11 00:00:05 +08:00
Finally got it kinda working, Geolocation is not going to work in browser anymore
This commit is contained in:
@@ -41,7 +41,7 @@ public class CordovaPlugin {
|
||||
public CordovaInterface cordova;
|
||||
protected CordovaPreferences preferences;
|
||||
private String serviceName;
|
||||
private String [] permissions;
|
||||
protected String [] permissions;
|
||||
|
||||
/**
|
||||
* Call this after constructing to initialize the plugin.
|
||||
@@ -387,6 +387,8 @@ public class CordovaPlugin {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -183,7 +183,7 @@ public class SystemWebChromeClient extends WebChromeClient {
|
||||
super.onGeolocationPermissionsShowPrompt(origin, callback);
|
||||
callback.invoke(origin, true, false);
|
||||
//Get the plugin, it should be loaded
|
||||
CordovaPlugin geolocation = parentEngine.pluginManager.getPlugin("org.apache.cordova.geolocation.PermissionHandler");
|
||||
CordovaPlugin geolocation = parentEngine.pluginManager.getPlugin("Geolocation");
|
||||
if(geolocation != null && !geolocation.hasPermisssion())
|
||||
{
|
||||
parentEngine.pluginManager.requestPermission(geolocation);
|
||||
|
||||
Reference in New Issue
Block a user