Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cordova camera PictureSourceType PHOTOLIBRARY v SAVEDPHOTOALBUM

None of this values working to launch the photo gallery in a phonegap application for android!!!

When the getPicture method is invoked with any of this values it does not pull up the photo gallery.

I build the app using the phonegap build cloud services

Please help,

sample code -

function getPhoto(source) {
  alert("getting photo");
  // Retrieve image file location from specified source
  navigator.camera.getPicture(onPhotoURISuccess, onFail, { destinationType: destinationType.FILE_URI, sourceType: source });
}
like image 957
Lanre Sideeq Avatar asked Feb 15 '23 02:02

Lanre Sideeq


1 Answers

Camera.PictureSourceType.PHOTOLIBRARY == entire library

Camera.PictureSourceType.SAVEDPHOTOALBUM == camera photo album

If you want users to upload any image on their phone stick to PHOTOLIBRARY. Or if you want users to upload only the pictures taken by the phone camera then use SAVEDPHOTOALBUM.

like image 72
Sushan Ghimire Avatar answered May 01 '23 14:05

Sushan Ghimire