hostcia opened a new issue #544: Cannot read property 'getPicture' of undefined URL: https://github.com/apache/cordova-plugin-camera/issues/544 I'm new to Cordova. I am trying to use the cordova-plugin-camera plugin. I generate the apk, and when I'm going to test it on my phone (**MotoG 3 - Android 6.0**), it doesn't open. Using debug shows this error: > Cannot read property 'getPicture' of undefined This code of mine: ```` <!DOCTYPE html> <html> <head> <meta name="format-detection" content="telephone=no"> <meta name="msapplication-tap-highlight" content="no"> <meta name="viewport" content="initial-scale=1, width=device-width, viewport-fit=cover"> <link rel="stylesheet" type="text/css" href="css/style.css"> <link rel="shortcut icon" href="img/favicon.png" /> <title>Foto</title> </head> <body> <div class="app"> <button type="button" class="btn" id="cameraApp">Tirar foto</button> <img src="" id="myImage"> </div> <script src="js/jquery-3.4.1.min.js"></script> <script> document.getElementById('cameraApp').addEventListener('click', cameraApp); function cameraApp() { navigator.camera.getPicture(onSuccess, onFail,{ quality: 100, saveToPhotoAlbum: true, destinatinType: Camera.DestinatinType.DATA_URL }); function onSuccess(imageData){ var image = document.getElementById('myImage'); image.src = "data:image/jpeg;base64," + imageData; } function onFail(message){ alert('Falhou: ' + message); } } </script> </body> </html> ````
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
