You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "IagoSRL (JIRA)" <ji...@apache.org> on 2016/07/20 11:00:27 UTC

[jira] [Commented] (CB-11382) Camera will not open

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

IagoSRL commented on CB-11382:
------------------------------

A workaround that may help some people: set the targetSdkVersion of your project to 22 or lower (that's immediately before Android 6 / API 23). That way, the new permissions management will not be used and the camera plugin will work.
Do it with next preference at the config.xml:
<preference name="android-targetSdkVersion" value="22" />

Take care: doing that, the app or included plugins cannot use any new feature from a higher Android API level.
Note: Even with that, the app can run at Android 6 devices and newer.
Google Play note: if you have already uploaded and published an APK with a target SDK of 23 (the default used at latest cordova-android), you cannot use this solution since the store will prevent you from downgrading the target SDK version of your app. This happens on any channel: alpha, beta and production.

I have this last problem, I cannot go back and my production App is just broken because of this bug, since I updated cordova-android without notice this could happen.

> Camera will not open
> --------------------
>
>                 Key: CB-11382
>                 URL: https://issues.apache.org/jira/browse/CB-11382
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Camera
>            Reporter: Ivan
>
> I'm using Cordova Camera Plugin (https://www.npmjs.com/package/cordova-plugin-camera) and starting with this line
> navigator.camera.getPicture(onSuccessPhoto, onFailPhoto, { quality: 50, destinationType: Camera.DestinationType.FILE_URI });
> On android 6.0.1. camera will not open and I got error 
> "permission denial: ... requires android.permission.read_external_storage or granturipermission()"
> On lower android version it works fine.



--
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