fluttercommunity / fluttercommunity/flutter_webview_plugin

Add a geolocationPermissionsRequested event

Open
#515 0 comments 0 reactions 0 assignees View on GitHub
feature request
Dominant language
Java
Stars
1.5k
Forks
938
PR merge metrics
No merged PRs in 30d

Description

## Use case

I'd like to be able to request geolocation runtime system permissions from the user when the web page shown in the webview plugin requests geolocation permissions. My code should then be able to tell the web site whether the permissions were given or not.

## Proposal

I'd like to have an event like `geolocationPermissionsRequested` in which I can check/request runtime permissions and return the result of that check/request. Once my (async!) code has finished and the event handler returns (the `Future` finishes), the web page should be informed of the result.

On Android, I'd basically like to implement `onGeolocationPermissionsShowPrompt` myself in Dart code. Only when my code finishes, the `GeolocationPermissions.Callback` should be called (with my result). I don't know if/how this would be done on iOS.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by inspecting the Android WebView callback onGeolocationPermissionsShowPrompt and the plugin's Dart event API. Trace how GeolocationPermissions.Callback receives its result and determine how an async Future handler could report back to the page. Done means the requested event can return the permission result on Android; the issue leaves iOS behavior open.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, dart, flutter, ios, java
Domain
mobile-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.