You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by no...@apache.org on 2023/10/27 13:36:22 UTC
(cordova-plugin-inappbrowser) branch master updated: GH-706 android: Allow permissions requests (#968)
This is an automated email from the ASF dual-hosted git repository.
normanbreau pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-inappbrowser.git
The following commit(s) were added to refs/heads/master by this push:
new d735e13 GH-706 android: Allow permissions requests (#968)
d735e13 is described below
commit d735e136cdf409472833558184764ea47d658c85
Author: joanbat <55...@users.noreply.github.com>
AuthorDate: Fri Oct 27 15:36:16 2023 +0200
GH-706 android: Allow permissions requests (#968)
Co-authored-by: joanb-moncasoft <55...@users.noreply.github.com>
---
src/android/InAppChromeClient.java | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/android/InAppChromeClient.java b/src/android/InAppChromeClient.java
index d73b11d..4ec6df1 100644
--- a/src/android/InAppChromeClient.java
+++ b/src/android/InAppChromeClient.java
@@ -34,6 +34,7 @@ import android.webkit.WebStorage;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.webkit.GeolocationPermissions.Callback;
+import android.webkit.PermissionRequest;
public class InAppChromeClient extends WebChromeClient {
@@ -45,6 +46,13 @@ public class InAppChromeClient extends WebChromeClient {
super();
this.webView = webView;
}
+
+ public void onPermissionRequest(final PermissionRequest request) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+ request.grant(request.getResources());
+ }
+ }
+
/**
* Handle database quota exceeded notification.
*
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org