Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
2.1.0
-
None
-
Cordova CLI, Android
Description
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 =
;
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
Attachments
Issue Links
- duplicates
-
CB-10857 Camera.getPicture return null for Google Drive (camera 2.1.1)
- Resolved