Erm, the Camera
docs cover this. Is this not working for you? Check out Camera.PictureSourceType
for details. The docs site givens this example for deriving an image thus:
function getPhoto(source) {
// Retrieve image file location from specified source
navigator.camera.getPicture(onPhotoURISuccess, onFail, { quality: 50,
destinationType: destinationType.FILE_URI,
sourceType: source });
}
sourceType
is the crucial bit here. It can be Camera.PictureSourceType.CAMERA
(the default), or more useful for you it can be Camera.PictureSourceType.PHOTOLIBRARY
or Camera.PictureSourceType.SAVEDPHOTOALBUM
.
Camera Documentation
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…