cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Homer (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-10670) Media Capture on Android 6.0.1 fails
Date Tue, 08 Mar 2016 20:07:40 GMT

    [ https://issues.apache.org/jira/browse/CB-10670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15185679#comment-15185679
] 

Tony Homer commented on CB-10670:
---------------------------------

[~riknoll] The latest release of media capture plugin has uses-permission (RECORD_AUDIO, RECORD_VIDEO,
WRITE_EXTERNAL_STORAGE) entries in plugin.xml but does not include PermissionHelper.  When
I started writing this comment, I thought this was related, but now that I've read over CB-10120
and the PR discussion and reflected a bit, I guess this is not really related.

It seems incorrect for any plugin to have dangerous uses-permission entries in plugin.xml
but not have PermissionsHandler, do you agree?  Should I open a new JIRA for this?  I'm not
sure if some of the permissions should be removed (because, similar to Camera plugin, intents
are used so the plugin does not itself require the permissions), but either way it seems like
an issue...



> Media Capture on Android 6.0.1 fails
> ------------------------------------
>
>                 Key: CB-10670
>                 URL: https://issues.apache.org/jira/browse/CB-10670
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Media Capture
>    Affects Versions: 5.1.0
>            Reporter: Christoph Brosdau
>            Assignee: Richard B Knoll
>            Priority: Critical
>              Labels: Android, triaged
>
> Although this should work, I cannot make it work - on android 6.0, i always have the
same issue concerning permissions - maybe I overlooked something, but I dont know what :)
> Whith the following super simple demo JS and latest Cordova and latest version of all
plugins, I get:
> navigator.device.capture.captureVideo(function(){},function(e){console.log(e);},{limit:1});
> In the console, I get:
> Permission Denial: starting Intent { act=android.media.action.VIDEO_CAPTURE cmp=com.google.android.GoogleCamera/com.android.camera.VideoCamera
(has extras) } from ProcessRecord{7481fe2 17042:tv.nexx.android.gdtv/u0a183} (pid=17042, uid=10183)
with revoked permission android.permission.CAMERA
> In Android Studio I get:
> Uncaught exception from plugin
>                                                                      java.lang.SecurityException:
Permission Denial: starting Intent { act=android.media.action.IMAGE_CAPTURE flg=0x3 cmp=com.google.android.GoogleCamera/com.android.camera.CaptureActivity
clip={text/uri-list U:file:///storage/emulated/0/Android/data/tv.nexx.android.gdtv/cache/.Pic.jpg}
(has extras) } from ProcessRecord{7481fe2 17042:tv.nexx.android.gdtv/u0a183} (pid=17042, uid=10183)
with revoked permission android.permission.CAMERA
>                                                                          at android.os.Parcel.readException(Parcel.java:1620)
>                                                                          at android.os.Parcel.readException(Parcel.java:1573)
>                                                                          at android.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:2658)
>                                                                          at android.app.Instrumentation.execStartActivity(Instrumentation.java:1507)
>                                                                          at android.app.Activity.startActivityForResult(Activity.java:3930)
>                                                                          at org.apache.cordova.CordovaActivity.startActivityForResult(CordovaActivity.java:332)
>                                                                          at android.app.Activity.startActivityForResult(Activity.java:3890)
>                                                                          at org.apache.cordova.CordovaInterfaceImpl.startActivityForResult(CordovaInterfaceImpl.java:65)
>                                                                          at org.apache.cordova.camera.CameraLauncher.takePicture(CameraLauncher.java:262)
>                                                                          at org.apache.cordova.camera.CameraLauncher.callTakePicture(CameraLauncher.java:236)
>                                                                          at org.apache.cordova.camera.CameraLauncher.execute(CameraLauncher.java:168)
>                                                                          at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98)
>                                                                          at org.apache.cordova.PluginManager.exec(PluginManager.java:133)
>                                                                          at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:59)
>                                                                          at org.apache.cordova.engine.SystemExposedJsApi.exec(SystemExposedJsApi.java:41)
>                                                                          at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native
Method)
>                                                                          at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:37)
>                                                                          at android.os.Handler.dispatchMessage(Handler.java:102)
>                                                                          at android.os.Looper.loop(Looper.java:148)
>                                                                          at android.os.HandlerThread.run(HandlerThread.java:61)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message