Reputation: 580
In phone gap iphone application,I want to display local notification at regular interval.So how can I do that?I found one sample plugin of local notification but it not works, so is their any setting in property list file for display notification?
Upvotes: 2
Views: 2312
Reputation: 4972
I made this tutorial / example of how to use the localNotification as well as make a callback to your app...
http://www.drewdahlman.com/meusLabs/?p=84
hope that helps!
Upvotes: 4
Reputation: 5647
For local notifications in iPhone, there is a PhoneGap plugin in the PhoneGap Plugins repo on GitHub: https://github.com/phonegap/phonegap-plugins
The local notification plugin is at:
https://github.com/phonegap/phonegap-plugins/tree/master/iPhone/LocalNotification
It doesn't have a README, but it does have an example.
Upvotes: 2
Reputation: 135
Thanks for clarifying what you're hoping to do. I don't think their's a built-in local/push notification in PhoneGap, but you can use the tools at http://urbanairship.com to accomplish this.
I'm not sure exactly what you're asking, but it sounds like you want to display a notification.
If that's what you're looking to do, stick this in your JS:
function alertDismissed(button) {
if (button == 1) {
alert('they hit yes');
}
}
navigator.notification.alert(
'Look at this message now!', // message
alertDismissed, // callback
'Look at me!', // title
'Yes,No' // buttonName
);
You'll also need to make sure you're calling the phonegap.js file in your document head.
Upvotes: 0