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

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

[~bowserj] I am able to reproduce this with the latest camera plugin, file 
plugin, and cordova android (master branch on all 3) on a marshmallow device. I 
selected images using the default picker, not Google Photos. Just to be sure, I 
also checked to make sure that I could dereference the URI from the default 
picker, and I was indeed able to get an actual file path from it using the 
{{FileHelper.getRealPath()}} method in the camera plugin (which requires READ 
permission, FYI)

> Null pointer exception calling resolveLocalFileSystemURI on image from photos
> -----------------------------------------------------------------------------
>
>                 Key: CB-9965
>                 URL: https://issues.apache.org/jira/browse/CB-9965
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin File
>    Affects Versions: 2.1.0, 3.0.0
>         Environment: Android 5+
>            Reporter: Connor Pearson
>            Assignee: Joe Bowser
>              Labels: Android
>
> Calling resolveLocalFileSystemURI on an image returned from Photos library 
> (using camera plugin) on android lollipop triggers a 1000 error code.
> Debugging the application shows that this is caused by a null pointer 
> exception.
> Example code:
> {code:javascript}
> document.getElementById("myButton").addEventListener("click", function(){
>           navigator.camera.getPicture(function(uri){
>               console.log(uri); 
> //content://com.android.providers.media.documents/document/image%3A27
>               window.resolveLocalFileSystemURI(uri, function(fileEntry){
>                   alert("success");
>               },function(error){
>                   alert("Fail resolveFileSystemURI code: " + error.code);
>               });
>           }, null, {sourceType: 0, allowEdit: false});
>       });
> {code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to