0
Hello guys I’m new to phonegap, and for this reason I still have some basic questions. I am writing an example code to appear an alert in the application, but at the moment I will compile the following error appears: Navigator.notification is Undefined Does anyone have any suggestions?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="user-scalable=no, initial-scale=1,maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
<title>Hello World</title>
</head>
<body>
<h1>Teste</h1>
<input type="button" id="alerta"value="Alerta" onClick="alerta()">
<script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript">
function alerta() {
navigator.notification.alert(
'Phonegap está funcionando!',
null,
'Sucesso',
'Fechar'
);
}
</script>
</body>
</html>
Take a look at this and see if it helps you. http://stackoverflow.com/questions/20627281/navigator-notification-alert-not-working-phonegap
– Samir Braga
Didn’t help much.
– IvanFloripa
Using phonegap build, Cordova or phonegap?
– Rui Lima
I am using Phonegap.
– IvanFloripa