mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-22 00:32:55 +08:00
Finally got it kinda working, Geolocation is not going to work in browser anymore
This commit is contained in:
parent
8981ddb681
commit
9a33943783
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user