I am developing a web application for the iOS7 platform using PhoneGap and a camera plugin. I want to use a camera roll with a button to enable capture mode (for example, as my own collector or as facebook photo mode). I use the Cordoba camera API, and the camera roll looks different (only photos / videos, not a button to enable capture mode). I read all the plugin documentation and tried to use a different set of parameters, but I can not find a solution.
<html>
<head>
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript" charset="utf-8">
var pictureSource;
var destinationType;
document.addEventListener("deviceready",onDeviceReady,false);
function onDeviceReady() {
pictureSource=navigator.camera.PictureSourceType;
destinationType=navigator.camera.DestinationType;
}
function onPhotoURISuccess(imageURI) {
var largeImage = document.getElementById('largeImage');
largeImage.style.display = 'block';
largeImage.src = imageURI;
}
function getPhoto(source) {
navigator.camera.getPicture(onPhotoURISuccess, onFail, { quality: 50,
destinationType: destinationType.FILE_URI,
sourceType: source });
}
function onFail(message) {
alert('Failed because: ' + message);
}
</script>
</head>
<body>
<button onclick="getPhoto(pictureSource.SAVEDPHOTOALBUM);">From Photo Album</button><br>
<img style="display:none;" id="largeImage" src="" />
</body>
</html>
source
share