I am developing a browser in Android webview, How can I detect if a website is asking for location permission and have custom control to give it or not.
Asked
Active
Viewed 374 times
2
-
1Don't know if this link would help https://stackoverflow.com/questions/23498523/android-ask-for-permission-to-use-location-within-webview – debo.stackoverflow May 25 '18 at 13:52
1 Answers
0
write below line in onCreate
webView.setWebViewClient(mWebViewClient);
write below methode in your class
private WebChromeClient mWebChromeCient = new WebChromeClient() {
@Override
public void onGeolocationPermissionsShowPrompt(String origin, GeolocationPermissions.Callback callback) {
super.onGeolocationPermissionsShowPrompt(origin, callback);
}
};

Sumit Bandekar
- 11
- 4