handle PermissionRequests in the WebChromeClient #217
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The idea behind this PR is to be capable of handling permission requests coming from the webview on Android. These are vital, if you would like to play DRM protected content inside of it, for example.
The requested resources could be divided into two different groups: the ones where we have a native Android permission as a counterpart, and the ones where we don't.
Where we don't have counterparts (midi sysex messages + protected media), we can use the newly introduced configuration properties inside
AndroidWebSettings
to automatically grant or deny the requested resources. On the other hand, where we have a counterpart for the requested resource, we check if the desired permission is already granted and if so, then we grant the requested resource too.What do you think @KevinnZou, would it make sense to have a dedicated section about this new functionality in the README?