Skip to content

Commit

Permalink
fix #1447
Browse files Browse the repository at this point in the history
  • Loading branch information
pichillilorenzo committed Nov 30, 2022
1 parent c2ce274 commit 9c0708f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, Object> obj = new HashMap<>();
obj.put("origin", request.getOrigin().toString());
obj.put("resources", Arrays.asList(request.getResources()));
Expand Down
2 changes: 1 addition & 1 deletion lib/src/in_app_browser/in_app_browser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<PermissionRequestResponse?>? androidOnPermissionRequest(
Expand Down
2 changes: 1 addition & 1 deletion lib/src/in_app_webview/webview.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<PermissionRequestResponse?> Function(
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 9c0708f

Please sign in to comment.