Camera api crashes on samsung galaxy

  • 1
  • Problem
  • Updated 7 years ago
Hi,
I have built an app that allows users to choose a photo using the phonegap camera api, and then upload it to a remote server for processing. When testing this on a samsung galaxy, however, I clicked on photos, and was given a number of photo sources (file manager etc.) only one of which was photogallery. If a user chooses a photo from the gallery, this process works fine, however, if a user selects from one of the other sources, the app crashes. Is there any way to block users from viewing any source other than the photogallery when selecting a photo? Below is the code I have used:

function getImage(index) {
// Retrieve image file location from specified source
currentIndex=index;
navigator.camera.getPicture(uploadPhoto, function(message) {
alert('get picture failed');
},{
quality: 50,
destinationType: Camera.DestinationType.FILE_URI,
sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
correctOrientation:true,
targetWidth: 500,
targetHeight: 550

}
);

}

Thanks,
Daryl
Photo of Daryl Smith

Daryl Smith

  • 9 Posts
  • 0 Reply Likes

Posted 8 years ago

  • 1
Photo of Zahir

Zahir

  • 3500 Posts
  • 40 Reply Likes
Due to the thread inactivity, this issue is now closed.
Create a new issue if you have any other problem with PhoneGap Build.
Thanks

This conversation is no longer open for comments or replies.