I'm trying to make a "Hello World" in Cordova, it's a screen with a button that activates the camera, it is not necessary to do anything else, just turn on the camera. the steps I followed.
<script type="text/javascript">
function teste(){
navigator.camera.getPicture(onSuccess, onFail, { quality: 50,
destinationType: Camera.DestinationType.DATA_URL
});
}
function onSuccess(imageData) {
var image = document.getElementById('myImage');
image.src = "data:image/jpeg;base64," + imageData;
}
function onFail(message) {
alert('Failed because: ' + message);
}
</script>
<button onclick="teste(); ">TESTAR</button>
The emulator is loaded with the button, but when I press, nothing happens
I tried to follow the example of the link link
unsuccessful
I'm using Windows 10 64bit