Skip to content

six519/cordova-plugin-android-badge-counter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

cordova plugin add https://github.com/six519/cordova-plugin-android-badge-counter.git --variable MAIN_ACTIVITY_CLASS="<FULLY_QUALIFIED_CLASS_NAME_OF_MAINACTIVITY>"

or via npm

cordova plugin add cordova-plugin-android-badge-counter --variable MAIN_ACTIVITY_CLASS="<FULLY_QUALIFIED_CLASS_NAME_OF_MAINACTIVITY>"

Note

If an error Error: Cannot find module 'xml2js' occurred then you need to uninstall first the plugin and install that missing module before re-installing the plugin again. :

cordova plugin rm cordova-plugin-android-badge-counter
npm install xml2js

Usage

//set badge count
window.badgeCounterPlugin.setBadge(1, function(e){
    //success callback
}, function(e){
    //error callback
    alert('The error is: ' + e);
});

//clear badge
window.badgeCounterPlugin.clearBadge(function(e){
    //success callback
}, function(e){
    //error callback
});

About

Cordova Plugin For Android Badge Counter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published