Reputation: 1816
I am developing an app using Mosync Reload 3.3 and I am having issues using the captureImage function to let a phone take a photo and upload it to my server.
Firstly, I only have a Google Nexus 4 for testing and it is not jailbroken. When I call the image capture function:
navigator.device.capture.captureImage(function(mediaFiles){
alert(JSON.stringify(mediaFiles));
}, function(error) {
alert('An error occurred during capture: ' + error.code);
}, {limit: 2}
);
My phone lets me take a photo, but in the mediaFiles object that is returned to the success function, the image path doesn't exist on my phone when I try and navigate there. The path says '/data/data/com.mosync.app_ReloadClient/files/saved/RLDPRJmyTestApp/image000.jpg'. When I go to the data folder on my phone it is empty, if I try to create another nested data folder it says file already exists so I guess it could just be a hidden folder I don't have access to?
Anyway, I can't progress further as when I try to upload the file I get an error message from FileTransfer , outputting error code 1 which means the file was not found.
Has anyone had any similar issues who can offer any advice as to what is going wrong?
Upvotes: 0
Views: 200
Reputation: 1
Make sure you have checked storage permission for your app.
Upvotes: -1