Skip to content

mosalingua/cordova-plugin-badge

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cordova Badge-Plugin

A bunch of badge notification plugins for Cordova 3.x.x

by Sebastián Katzer (github.com/katzer)

Supported Platforms

  • iOS
  • WP8

Adding the Plugin to your project

Through the Command-line Interface:

cordova plugin add https://github.com/katzer/cordova-plugin-badge.git

Removing the Plugin from your project

Through the Command-line Interface:

cordova plugin rm de.appplant.cordova.plugin.badge

Release Notes

Version 0.4.0 (07.10.2013)

  • Added WP8 support
  • Note: The former plugin.badge namespace is not longer available.

Version 0.2.1 (15.08.2013)

  • Added new namespace plugin.notification.badge
    Note: The former plugin.badge namespace is deprecated now and will be removed in the next major release.

Version 0.2.0 (11.08.2013)

  • Added iOS support
    Based on the Badge iOS plugin made by Joseph Stuhr

Using the plugin

The plugin creates the object window.plugin.notification.badge with two methods:

set()

To set the badge number:

window.plugin.notification.badge.set(_number_);

clear()

To clear the badge:

window.plugin.notification.badge.clear();
window.plugin.notification.badge.set(0);  // alternative

Example

To set the badge number to 1:

window.plugin.notification.badge.set(1);
// or
window.plugin.notification.badge.set('1');

About

A bunch of badge notification plugins for Cordova 3.x.x

Resources

License

Stars

Watchers

Forks

Packages

No packages published