Cordova相机PictureSourceType PHOTOLIBRARY v SAVEDPHOTOALBUM

Lan*_*eeq 4 javascript android cordova

这些价值观都不适用于在Android的phonegap应用程序中启动照片库!

getPicture使用任何此值调用方法时,它不会拉出照片库.

我使用phonegap构建云服务构建应用程序

请帮忙,

示例代码 -

function getPhoto(source) {
  alert("getting photo");
  // Retrieve image file location from specified source
  navigator.camera.getPicture(onPhotoURISuccess, onFail, { destinationType: destinationType.FILE_URI, sourceType: source });
}
Run Code Online (Sandbox Code Playgroud)

Sus*_*ire 8

Camera.PictureSourceType.PHOTOLIBRARY == entire library

Camera.PictureSourceType.SAVEDPHOTOALBUM == camera photo album

如果您希望用户将手机上的任何图像上传到PHOTOLIBRARY.或者,如果您希望用户仅上传手机摄像头拍摄的照片,请使用SAVEDPHOTOALBUM.