开发者

Android - How to specify photo file name/directory using Phonegap

How can I specify the name an开发者_开发问答d destination of captured photo using Phonegap? Couldn't find this info anywhere. Right now it just goes to /sdcard/pic.jpg.

Here's what I have so far:

function capturePhoto() {
navigator.camera.getPicture(onSuccess, onFail, { quality: 50,  
destinationType: Camera.DestinationType.FILE_URI });  

function onSuccess(imageURI) { 
var image = document.getElementById('myImage'); 
image.style.display = 'block';
image.src = imageURI; 
} 

function onFail(message) { 
alert('Failed because: ' + message); 
} 
}


try content://media/external/images/media/n

where n is the image number you are trying to call (1,2,3, etc)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜