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

Richard B Knoll commented on CB-10064:
--------------------------------------

Ahhh, figured it out. If you request the CAMERA permission in your 
AndroidManifest.xml, then sending the camera intent causes a security exception 
(see [this stackoverflow 
thread|http://stackoverflow.com/questions/32789027/android-m-camera-intent-permission-bug]).
 I can reproduce that crash. We do not declare that permission in the manifest 
for the camera plugin, so I'm guessing you either have a third party plugin 
that is inserting it or you added it to your manifest yourself at some point. 
Either way, our camera plugin should probably handle that situation! I'll 
create a separate JIRA for that issue. Thanks for bringing it to our attention!

As for the issue at hand, you should be able to try it out with an empty 
project with nothing but the camera plugin added and your js code above. Check 
your AndroidManifest.xml to make sure it doesn't have a line like this: 
{{<uses-permission android:name="android.permission.CAMERA" />}}. You can find 
the manifest file at {{platforms\android\AndroidManifest.xml}}

> Camera.getPicture - Wrong FileURI
> ---------------------------------
>
>                 Key: CB-10064
>                 URL: https://issues.apache.org/jira/browse/CB-10064
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Camera
>    Affects Versions: 5.3.3
>         Environment: Android 6.0
>            Reporter: graphefruit
>              Labels: android
>         Attachments: log_error.txt
>
>
> Hello!
> if you take a picture with cordova and need to edit the picture, you won't 
> get the edited image-file-uri if the quality is set to "100".
> {code:javascript}
>  navigator.camera.getPicture(onSuccess, onFail, {
>                     quality: 100,
>                     destinationType: Camera.PictureSourceType.CAMERA,
>                     sourceType: sourceTypeCamera.DestinationType.NATIVE_URI
>                     allowEdit: true,
>                     encodingType: Camera.EncodingType.PNG,
>                     mediaType: window.Camera.MediaType.PICTURE,
>                     targetWidth: 0,
>                     targetHeight: 0,
>                     popoverOptions: CameraPopoverOptions,
>                     saveToPhotoAlbum: false
>                 });
> {code}
> If the quality is set to 99 the original image will be overwritten with the 
> edited image content and another image is created and saved with the edited 
> image content.
> At least you can then use the edited image.
> Suggestion:
> Pass two parameters 
> {code:javascript}
> function onSuccess(_originalURI,_editedURI)
> {
> }
> {code}
> Edit 2:
> The SourceType: NATIVE_URI and FILE_URI are affected
> Thanks & Greetings
> Graphefruit



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

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

Reply via email to