GitHub user vbraun opened a pull request:
https://github.com/apache/cordova-android/pull/178
Grant Lollipop permission requests
This patch overrides onPermissionRequest so that getUserMedia can be used
inside the browser.
Since a hybrid app has to request permissions anyways via
AndroidManifest.xml, I think it is unnecessary to have any further
configuration for onPermissionRequest. Anything that the app is allowed to do
should be possible from the JS side. Hence all requests are granted. This
enables getUserMedia (and WebRTC) on Android Lollipop, without resorting to
crosswalk.
The docs say that request.grant has to be called from the UI thread, but
don't explicitly spell out whether onPermissionRequest is called from the UI
thread. I think that this is so, the WebChromeClient of course makes its calls
from the UI thread unless otherwise noted. So there is no need to post a
runnable to the UI thread.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/vbraun/cordova-android lollipop-permissions
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-android/pull/178.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #178
----
commit 6f9cc5f24c7a3416c913142b37440479bc3b07ec
Author: Volker Braun <[email protected]>
Date: 2015-06-03T20:59:49Z
Grant Lollipop permission requests
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]