This question is locked. New answers and comments are not allowed.
I try to use the getPicture function but I suspect it needs some permission because the alert in the callback function works but navigator.camera.getPicture(...) does nothing. Below I put the code:
function takePhoto() {
navigator.notification.alert("Camera", null, "Photo", "Confirm");
navigator.camera.getPicture(onCameraSuccess, onCameraError);
navigator.notification.alert("photo");
}
function onCameraSuccess(imageURL) {
navigator.notification.alert("onCameraSuccess: " +
imageURL);
}
function onCameraError(e) {
navigator.notification.alert("onCameraError: " + e);
}
function takePhoto() {
navigator.notification.alert("Camera", null, "Photo", "Confirm");
navigator.camera.getPicture(onCameraSuccess, onCameraError);
navigator.notification.alert("photo");
}
function onCameraSuccess(imageURL) {
navigator.notification.alert("onCameraSuccess: " +
imageURL);
}
function onCameraError(e) {
navigator.notification.alert("onCameraError: " + e);
}