Anders Pettersson
unread,Jul 24, 2013, 5:07:29 PM7/24/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to phon...@googlegroups.com
Hi,
I'm working on a simple app, and atm I'm just presenting a home screen (index.html). I want to include Notification so that I can makes some nice alerts, by using navigator.notification.alert(). But it seems that it never gets loaded.
I'm on a Mac using Xcode 4.6.3 and I've put this in my config.xml (the one directly under my project root):
<plugins>
<plugin name="Geolocation" value="CDVLocation" />
<plugin name="Notification" value="CDVNotification" />
</plugins>
But nothing happens when I try to call it from my index.html page. It looks like this:
<script>
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
navigator.notification.alert("Hello world", null, "Alert", "Done");
}
</script>
Anyone have any clues?
Regards,
Anders Pettersson