-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[webview_flutter][webview_flutter_android] Add android support for handling geolocation permissions #3475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@bparrishMines @stuartmorgan hi, can you review my code? Thanks |
…… |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution! I left some comments on the implementation.
I think you can remove the changes to webview_flutter
. Since this feature is Android only, I don't think we need to include an example in webview_flutter
. We don't want to have every platform specific feature used as an example in the app-facing package.
packages/webview_flutter/webview_flutter_android/lib/src/android_webview.dart
Outdated
Show resolved
Hide resolved
packages/webview_flutter/webview_flutter_android/lib/src/android_webview_controller.dart
Outdated
Show resolved
Hide resolved
packages/webview_flutter/webview_flutter_android/lib/src/android_webview_controller.dart
Outdated
Show resolved
Hide resolved
packages/webview_flutter/webview_flutter_android/lib/src/android_webview_controller.dart
Outdated
Show resolved
Hide resolved
packages/webview_flutter/webview_flutter_android/lib/src/android_webview.dart
Outdated
Show resolved
Hide resolved
packages/webview_flutter/webview_flutter_android/lib/src/android_webview_controller.dart
Outdated
Show resolved
Hide resolved
I have finished it. Please review it again, thanks @bparrishMines And why my dart format always fail to the rule? this wasted a lot of my time |
@yk3372 The dart formatter was most likely failing because you were using an older version of Flutter. We develop plugins on the latest version of the main branch of flutter/flutter, so running the It looks like this has the new Android lint errors from #3648. I'll update this PR after I update the pigeon version and lint errors in another PR. |
please review again, thanks |
packages/webview_flutter/webview_flutter_android/lib/src/android_webview.dart
Outdated
Show resolved
Hide resolved
packages/webview_flutter/webview_flutter_android/lib/src/android_webview_controller.dart
Outdated
Show resolved
Hide resolved
packages/webview_flutter/webview_flutter_android/lib/src/android_webview_controller.dart
Outdated
Show resolved
Hide resolved
packages/webview_flutter/webview_flutter_android/lib/src/android_webview_controller.dart
Outdated
Show resolved
Hide resolved
I left a few more comments and updated the lint the Java code for the new lint warnings. |
I have finish it, please review again, thanks |
I have made a wrong operation…… |
This PR Add android support for handling geolocation permissions.
(WebChromeClient.onGeolocationPermissionsShowPrompt) api as a platform callback that notify the host application that web content from the specified origin is attempting to use the Geolocation API.
The host application should invoke the specified callback with the desired permission state.
Fixes flutter/flutter#27472
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes].CHANGELOG.md
to add a description of the change, [following repository CHANGELOG style].///
).