I'm new to PhoneGap Build, and I'm trying to start creating an app in PG Build. I tried just moving everything over, but I'm having trouble, so I started by trying to make a simple app that just shows an alert box. This is still not working, so I thought I'd post my code and see if I can get some help. I have tried multiple different pieces of code, but they don't seem to be working.
I'm testing on an iPad mini, and I have the Apple developer account. The app loads fine-the only problem is that the alert box doesn't show...here's the code:
index.html
<!DOCTYPE html>
<html>
<head>
<title>Notification Example</title>
<script src="phonegap.js"></script>
<script type="text/javascript" charset="utf-8">
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
//Empty
}
function alertDismissed() {
//Do something
}
function showAlert() {
navigator.notification.alert(
'You are the winner!',
alertDismissed,
'Game Over',
'Done'
);
}
</script>
</head>
<body>
<p><a href="#" onclick="showAlert(); return false;">Show Alert</a></p>
</body>
</html>
config.xml
(stripped irrelevant code for ease of reading)
....
<feature name="http://api.phonegap.com/1.0/battery"/>
<feature name="http://api.phonegap.com/1.0/camera"/>
<feature name="http://api.phonegap.com/1.0/contacts"/>
<feature name="http://api.phonegap.com/1.0/file"/>
<feature name="http://api.phonegap.com/1.0/geolocation"/>
<feature name="http://api.phonegap.com/1.0/media"/>
<feature name="http://api.phonegap.com/1.0/network"/>
<feature name="http://api.phonegap.com/1.0/notification"/>
....
Can anyone help? Like I said, I'm new to PG, so I'd really appreciate and help I can get! Thanks!