A bunch of badge notification plugins for Cordova 3.x.x
by Sebastián Katzer (github.com/katzer)
- iOS
- WP8
Through the Command-line Interface:
cordova plugin add https://github.com/katzer/cordova-plugin-badge.git
Through the Command-line Interface:
cordova plugin rm de.appplant.cordova.plugin.badge
- Added WP8 support
- Note: The former
plugin.badge
namespace is not longer available.
- Added new namespace
plugin.notification.badge
Note: The formerplugin.badge
namespace is deprecated now and will be removed in the next major release.
- Added iOS support
Based on the Badge iOS plugin made by Joseph Stuhr
The plugin creates the object window.plugin.notification.badge
with two methods:
To set the badge number:
window.plugin.notification.badge.set(_number_);
To clear the badge:
window.plugin.notification.badge.clear();
window.plugin.notification.badge.set(0); // alternative
To set the badge number to 1:
window.plugin.notification.badge.set(1);
// or
window.plugin.notification.badge.set('1');