cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Kotikov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-11367) cordova-plugin-camera retuns NULL file url on success when mediaType : AllMedia (2) (only on Android)
Date Thu, 14 Jul 2016 11:03:20 GMT

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

Vladimir Kotikov commented on CB-11367:
---------------------------------------

Possible duplicate of CB-10857

> 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
>              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-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message