I am developing a Cordova 3.0.0 application which needs to periodically show notifications to the user. They need to be the kind of notifications that live in the notification center on iOS; modal popups aren’t good enough as the app may be running in the background at the time.
The built-in Notification plugin only provides modal popups: http://docs.phonegap.com/en/3.0.0/cordova_notification_notification.md.html
I have seen 3rd party plugins, such as this: https://github.com/DrewDahlman/Phonegap-LocalNotification
– however, they are developed for much older versions of Cordova/PhoneGap.
Is it possible to use any of these with Cordova 3; or is there a better way to do it (device-independently if at all possible, as I need to have similar behaviour on Android as well as iOS); or would my best option be to downgrade to an older version of Cordova?
I googled but couldn’t find anything.
My suggestion would be that you write your own plugins/extensions for Android and IOS respectively. It isn’t difficult. The problem with writing your own IOS plugin is that you need to have a mac and iphone/ipad. Also, try the Phonegap-LocalNotification plugin you mention, it could possibly work.
According to the issues for Drew Dalhman’s plugin some people have had some success using that plugin in Cordova 3.0.6:
Rather than downgrading to an earlier version I’d look to see if a pull request can be created for the plugin. This will help everyone and will allow you to take advantage of Cordova improvements.
I was actually researching this same issue earlier for Android. Not implemented anything yet, but this tutorial seems to have some useful information (Part 3 is most relevant to showing notifications):
Drew Dalhman’s Plugin still has some Issues. For example cancel() and background callback do not work.
This one, from Sebastián Katzer is updated and works with Cordova 3+ :
for iOS, Android and WP8