cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Gonzalez (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-13572) resolveLocalFileSystemURL in camera.getPicture not works
Date Tue, 14 Nov 2017 17:27:00 GMT

     [ https://issues.apache.org/jira/browse/CB-13572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

David Gonzalez updated CB-13572:
--------------------------------
    Description: 
This error is only  in Android. In other platforms works succesfully.

If mediaType is "Camera.MediaType.PICTURE" works ok. The "imageUri" variable is for example:
content://com.android.providers.media.documents/document/image%3A125 the resolveLocalFileSystemURL
function works ok.

If mediaType is "Camera.MediaType.VIDEO" or "Camera.MediaType.ALLMEDIA" the "imageUri" variable
is:
/storage/emulated/0/DCIM/Camera/VID_20171114_181057214.mp4 and the resolveLocalFileSystemURL
not works

{code:javascript}
var options = {
            destinationType: Camera.DestinationType.FILE_URI,
            sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
            mediaType: Camera.MediaType.VIDEO
        };

        function cameraSuccess(imageUri){
            console.log(imageUri);
            window.resolveLocalFileSystemURL(imageUri,
            function(entry){
                console.log("Works Ok");
                console.log(entry);
            },
            function(error){
                console.log("error");
                console.log(entry);
            });
        }

        function cameraError(error){
   
        }

        navigator.camera.getPicture(cameraSuccess, cameraError, options);{code}


  was:
This error is only  in Android. In other platforms works succesfully.

If mediaType is "Camera.MediaType.PICTURE" works ok. The "imageUri" variable is for example:
content://com.android.providers.media.documents/document/image%3A125 the resolveLocalFileSystemURL
function works ok.

If mediaType is "Camera.MediaType.VIDEO" or "Camera.MediaType.ALLMEDIA" the "imageUri" variable
is:
/storage/emulated/0/DCIM/Camera/VID_20171114_181057214.mp4

{code:javascript}
var options = {
            destinationType: Camera.DestinationType.FILE_URI,
            sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
            mediaType: Camera.MediaType.VIDEO
        };

        function cameraSuccess(imageUri){
            console.log(imageUri);
            window.resolveLocalFileSystemURL(imageUri,
            function(entry){
                console.log("Works Ok");
                console.log(entry);
            },
            function(error){
                console.log("error");
                console.log(entry);
            });
        }

        function cameraError(error){
   
        }

        navigator.camera.getPicture(cameraSuccess, cameraError, options);{code}



> resolveLocalFileSystemURL in camera.getPicture not works
> --------------------------------------------------------
>
>                 Key: CB-13572
>                 URL: https://issues.apache.org/jira/browse/CB-13572
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-plugin-camera
>            Reporter: David Gonzalez
>            Priority: Critical
>              Labels: android
>
> This error is only  in Android. In other platforms works succesfully.
> If mediaType is "Camera.MediaType.PICTURE" works ok. The "imageUri" variable is for example:
> content://com.android.providers.media.documents/document/image%3A125 the resolveLocalFileSystemURL
function works ok.
> If mediaType is "Camera.MediaType.VIDEO" or "Camera.MediaType.ALLMEDIA" the "imageUri"
variable is:
> /storage/emulated/0/DCIM/Camera/VID_20171114_181057214.mp4 and the resolveLocalFileSystemURL
not works
> {code:javascript}
> var options = {
>             destinationType: Camera.DestinationType.FILE_URI,
>             sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
>             mediaType: Camera.MediaType.VIDEO
>         };
>         function cameraSuccess(imageUri){
>             console.log(imageUri);
>             window.resolveLocalFileSystemURL(imageUri,
>             function(entry){
>                 console.log("Works Ok");
>                 console.log(entry);
>             },
>             function(error){
>                 console.log("error");
>                 console.log(entry);
>             });
>         }
>         function cameraError(error){
>    
>         }
>         navigator.camera.getPicture(cameraSuccess, cameraError, options);{code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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


Mime
View raw message