i'm trying to add picture on my server with jquery mobile and php on a cordova project for android.
When i select a picture from my librairie or i make a capture, the app restart instead of refreshing my form with the picture.
here is my html code:
<button onclick="capturePhoto();">Capture Photo</button>
<button onclick="getPhoto(pictureSource.PHOTOLIBRARY);">From Photo Library</button>
here is my jquery mobile code:
function capturePhoto() {
navigator.camera.getPicture(onPhotoDataSuccess, onFail, {
quality: 50,
targetWidth: 600,
targetHeight: 600,
destinationType: destinationType.FILE_URI,
encodingType:navigator.camera.EncodingType.JPEG,
saveToPhotoAlbum: true
});
}
function getPhoto(source) {
navigator.camera.getPicture(onPhotoURISuccess, onFail, {
quality: 50,
targetWidth: 600,
targetHeight: 600,
destinationType: destinationType.FILE_URI,
encodingType:navigator.camera.EncodingType.JPEG,
sourceType: source
});
}
I've searched everywhere but i can't find any solution.
EDIT, i have the last version of cordova and the last of file plugin