携帯電話で写真を撮ってソーシャル ネットワークに送信するアプリを開発しています。私のアプリは sencha touch 2 と Phonegap で開発されています。写真を撮ろうとすると、アプリが再起動し、「カメラがキャンセルされました」というエラーが表示されます。console.logs を見ようとしましたが、表示されません...
これが私のコードです:
function uploadPhoto(data){
// this is where i will send the image file to server
//output image to screen
console.log(data);
}
function fail(msg){
alert(msg);
}
navigator.camera.getPicture(uploadPhoto, fail, {
quality : 30,
destinationType: Camera.DestinationType.DATA_URL
});</i>