Skip to content

Commit

Permalink
Merge pull request #441 from iamluciano/master
Browse files Browse the repository at this point in the history
Android: allow geolocation and file chooser simultaneously
  • Loading branch information
charafau authored Aug 15, 2019
2 parents bc2f8cd + 337c137 commit 9bd013d
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ public void onProgressChanged(WebView view, int progress) {
args.put("progress", progress / 100.0);
FlutterWebviewPlugin.channel.invokeMethod("onProgressChanged", args);
}

public void onGeolocationPermissionsShowPrompt(String origin, GeolocationPermissions.Callback callback) {
callback.invoke(origin, true, false);
}
});
}

Expand Down Expand Up @@ -371,12 +375,6 @@ void openUrl(

if (geolocationEnabled) {
webView.getSettings().setGeolocationEnabled(true);
webView.setWebChromeClient(new WebChromeClient() {
@Override
public void onGeolocationPermissionsShowPrompt(String origin, GeolocationPermissions.Callback callback) {
callback.invoke(origin, true, false);
}
});
}

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Expand Down

0 comments on commit 9bd013d

Please sign in to comment.