diff --git a/CHANGELOG.md b/CHANGELOG.md index f9a054dd3..17315f7c1 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 5.7.2+1 + +- Fixed "Cannot Grant Permission at Android 21" [#1447](https://github.com/pichillilorenzo/flutter_inappwebview/issues/1447) + ## 5.7.2 - Removed Android Hybrid Composition constraint to use the pull-to-refresh feature diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebViewChromeClient.java b/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebViewChromeClient.java index bc6d512ed..5df7aa2ad 100755 --- a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebViewChromeClient.java +++ b/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebViewChromeClient.java @@ -1187,7 +1187,7 @@ private Boolean isArrayEmpty(String[] arr) { @Override public void onPermissionRequest(final PermissionRequest request) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { Map obj = new HashMap<>(); obj.put("origin", request.getOrigin().toString()); obj.put("resources", Arrays.asList(request.getResources())); diff --git a/lib/src/in_app_browser/in_app_browser.dart b/lib/src/in_app_browser/in_app_browser.dart index 0480643d8..c0277932a 100755 --- a/lib/src/in_app_browser/in_app_browser.dart +++ b/lib/src/in_app_browser/in_app_browser.dart @@ -701,7 +701,7 @@ class InAppBrowser { /// ///[resources] represents the array of resources the web content wants to access. /// - ///**NOTE**: available only on Android 23+. + ///**NOTE**: available only on Android 21+. /// ///**Official Android API**: https://developer.android.com/reference/android/webkit/WebChromeClient#onPermissionRequest(android.webkit.PermissionRequest) Future? androidOnPermissionRequest( diff --git a/lib/src/in_app_webview/webview.dart b/lib/src/in_app_webview/webview.dart index 99dbc4a76..b672e66e7 100644 --- a/lib/src/in_app_webview/webview.dart +++ b/lib/src/in_app_webview/webview.dart @@ -449,7 +449,7 @@ abstract class WebView { /// ///[resources] represents the array of resources the web content wants to access. /// - ///**NOTE**: available only on Android 23+. + ///**NOTE**: available only on Android 21+. /// ///**Official Android API**: https://developer.android.com/reference/android/webkit/WebChromeClient#onPermissionRequest(android.webkit.PermissionRequest) final Future Function( diff --git a/pubspec.yaml b/pubspec.yaml index 6137ff9d8..730518422 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_inappwebview description: A Flutter plugin that allows you to add an inline webview, to use an headless webview, and to open an in-app browser window. -version: 5.7.2 +version: 5.7.2+1 homepage: https://inappwebview.dev/ repository: https://github.com/pichillilorenzo/flutter_inappwebview issue_tracker: https://github.com/pichillilorenzo/flutter_inappwebview/issues