0

I need to create an app that with Appmobi or Phonegap that will be able to take an automatic picture with a time interval.

Is it possible to perform this?

I know hot to launch the camera with 30 seconds interval, but I need to launch the camera and take a picture. The device will be on a quadcopter, so no human interaction will be avalilable.

4

2 回答 2

0

我认为你必须使用camera.getPicture

function onSuccess(imageData) {
    var image = document.getElementById('myImage');
    image.src = "data:image/jpeg;base64," + imageData;
}

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

function getPicture(){
   navigator.camera.getPicture(onSuccess, onFail, { quality: 50 }); 
}

setInterval(getPicture, 30000);
于 2013-04-20T20:13:06.583 回答
-1

是的,这是一个自动的..在 setInterval 方法的帮助下,每 3 秒拍摄一次照片..

于 2013-04-22T10:51:52.180 回答