You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by vbraun <gi...@git.apache.org> on 2015/06/03 23:14:32 UTC

[GitHub] cordova-android pull request: Grant Lollipop permission requests

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 <vb...@gmail.com>
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-android pull request: Grant Lollipop permission requests

Posted by mccob <gi...@git.apache.org>.
Github user mccob commented on the pull request:

    https://github.com/apache/cordova-android/pull/178#issuecomment-216920234
  
    How we are supposed to invoke permission request on Android M with cordova ? getUserMedia doesn't produce any permission request and leave errors from accessing media


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-android issue #178: Grant Lollipop permission requests

Posted by infil00p <gi...@git.apache.org>.
Github user infil00p commented on the issue:

    https://github.com/apache/cordova-android/pull/178
  
    @dpogue That's exactly what needs to happen, and currently this is only half-done so I can't accept this pull request as is.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-android issue #178: Grant Lollipop permission requests

Posted by infil00p <gi...@git.apache.org>.
Github user infil00p commented on the issue:

    https://github.com/apache/cordova-android/pull/178
  
    BTW: I'm going to close this and recommend that the approach dpogue is mentioning be taken.  We can't guarantee behaviour across multiple webviews.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-android issue #178: Grant Lollipop permission requests

Posted by anatoly-khomenko <gi...@git.apache.org>.
Github user anatoly-khomenko commented on the issue:

    https://github.com/apache/cordova-android/pull/178
  
    Hello,
    
    @infil00p 
    Dear Joe, could you point to some solution to handle this currently? We need to use camera from WebView in a Cordova application, but this does not seem to be possible as far as I understand it now.



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-android pull request: Grant Lollipop permission requests

Posted by vbraun <gi...@git.apache.org>.
Github user vbraun commented on the pull request:

    https://github.com/apache/cordova-android/pull/178#issuecomment-108617961
  
    Corresponding Apache JIRA issue: https://issues.apache.org/jira/browse/CB-9115


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-android pull request: Grant Lollipop permission requests

Posted by dpogue <gi...@git.apache.org>.
Github user dpogue commented on the pull request:

    https://github.com/apache/cordova-android/pull/178#issuecomment-216921401
  
    Maybe we need a plugin that acts as a polyfill for the [W3C Permissions API](https://w3c.github.io/permissions/) `navigator.permission.request()` to programmatically invoke 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-android pull request #178: Grant Lollipop permission requests

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cordova-android/pull/178


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org