I tested Android, and my goal is to take some photos using either a Cordova camera or Media Capture, and save them in a gallery that will automatically correct / correct the orientation. The back button in conjunction with Media Capture cancels the photo session, but it seems to save photos without adjusting the orientation. If I take photos using the camera plugin, I get exactly what I need, but I can take only one photo at a time. Is there a way to wrap navigator.camera.getPicture in a loop that will take a snapshot until the cancel / return button is applied. It seems that the function is asynchronous, and I could not get it to work regardless of approach.
Which is strange if I use the file manager to manually copy files saved by the media capture plugin to the gallery or to the same folder, the orientation of which is fixed.
UPDATE: I solved this by calling a function to take a snapshot again in a success event.
function takePicture(){ navigator.camera.getPicture( cameraSuccess, cameraError, { quality: 50, destinationType: Camera.DestinationType.FILE_URI, correctOrientation: true, saveToPhotoAlbum: true }); } function cameraSuccess(uri){
source share