packages
packages copied to clipboard
[webview_flutter][webview_flutter_android] Add android support for handling geolocation permissions
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 https://github.com/flutter/flutter/issues/27472
Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities.
- [x] I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use
dart format.) - [x] I signed the [CLA].
- [x] The title of the PR starts with the name of the package surrounded by square brackets, e.g.
[shared_preferences] - [x] I listed at least one issue that this PR fixes in the description above.
- [x] I updated
pubspec.yamlwith an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes]. - [x] I updated
CHANGELOG.mdto add a description of the change, [following repository CHANGELOG style]. - [x] I updated/added relevant documentation (doc comments with
///). - [x] I added new tests to check the change I am making, or this PR is [test-exempt].
- [x] All existing and new tests are passing.
@bparrishMines @stuartmorgan hi, can you review my code? Thanks
……
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 flutter_plugins_tools format command must be run while using the latest Flutter version.
It looks like this has the new Android lint errors from https://github.com/flutter/packages/pull/3648. I'll update this PR after I update the pigeon version and lint errors in another PR.
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 inwebview_flutter. We don't want to have every platform specific feature used as an example in the app-facing package.
please review again, thanks
I left a few more comments and updated the lint the Java code for the new lint warnings.
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……