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

Vladimir Kotikov closed CB-11367.
---------------------------------
    Resolution: Duplicate

Closing as duplicate

> cordova-plugin-camera retuns NULL file url on success when mediaType : 
> AllMedia (2) (only on Android)
> -----------------------------------------------------------------------------------------------------
>
>                 Key: CB-11367
>                 URL: https://issues.apache.org/jira/browse/CB-11367
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Camera
>    Affects Versions: 2.1.0
>         Environment: Cordova CLI, Android
>            Reporter: Samir
>            Assignee: Vladimir Kotikov
>              Labels: Android, reproduced, triaged, wfc
>
> Hi 
> Not sure if I am doing anything wrong or it's a bug.
> I am using Phonegap / cordova CLI
> Plugin: cordova-plugin-camera (latest version 2.2.0)
> -------------------------------------------------------------------
> This is my code sample:
> ========================================================================
> var pictureSource;
> var destinationType;
> document.addEventListener("deviceready",onDeviceReady,false);
> function onDeviceReady() {
>       pictureSource=navigator.camera.PictureSourceType;
>       destinationType=navigator.camera.DestinationType;
> }
> function getMedia() {
>       var gallery_options = { quality: 50, destinationType: 
> destinationType.FILE_URI, sourceType: PictureSourceType.PHOTOLIBRARY, 
> mediaType: 2 };
>       navigator.camera.getPicture(onSuccess, onFail, gallery_options);
> }
> function onSuccess(url) {
>       alert(url); // getting NULL here
> }
> =========================================================================
> As you can see, I am getting photos and videos from Gallery and destination 
> type is file Url.
> MediaType is set to 2 which means both photos and videos.
> If mediaType is 0 > then no problem. It returns image url
> If it is 1 (video only) returns NULL
> if it is 2, returns NULL on both images and videos.
> It seems to be working only when mediaType is 0 !! (but I need both photos 
> and videos!)
> This only happens on Android !!
> on iOS device, no issue.
> I have tried on Developers app, emulator, real device...same result!
> Any help would be much appreciated!
> S



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