我正在尝试使用cordova-plugin-camera从相机拍摄照片,有时相机应用程序会正常检索照片,但有时它会崩溃。我该如何解决这个问题?
我已按照此页面中的教程进行操作:clearlyinnovative
我的一些代码:
navigator.camera.getPicture(
// Imagem obtida com sucesso, em imageURI
function(resultImageUri) {
// HERE - Sometimes the app crashes at this point, and sometimes it retrieves me the file normally...
},
// Error
function(error) {
console.error('navigator.camera.getPicture error - ', error);
},
{
destinationType: navigator.camera.DestinationType.FILE_URI,
quality: 40,
targetWidth: 500,
targetHeight: 500,
allowEdit: true,
saveToPhotoAlbum: false
}
);