I saw on the internet an example to capture photo in the app. I am debugging and this error appears:
Uncaught ReferenceError: takepic is not defined
My code:
function takepic(){
intel.xdk.camera.takePicture(10,true, "jpg");
}
document.addEventListener("intel.xdk.camera.picture.add", function(event){
var nomeFoto = event.filename;
var url = intel.xdk.camera.getPictureURL(nomeFoto);
document.getElementById("ocorrenciaFoto1").setAttribute("src", url);
});
Button that does the action:
<button onclick="takepic()" class="btn widget uib_w_50 d-margins btn-lg btn-primary" data-uib="twitter%20bootstrap/button" data-ver="1"><i class="glyphicon glyphicon-camera button-icon-top" data-position="top"></i>Foto</button>
What's wrong?