Skip to content
This repository has been archived by the owner on Feb 7, 2019. It is now read-only.

Way to clear badge count? #31

Closed
dklinzing opened this issue Jun 10, 2016 · 1 comment
Closed

Way to clear badge count? #31

dklinzing opened this issue Jun 10, 2016 · 1 comment

Comments

@dklinzing
Copy link

After push notifications are sent, and the app is opened or a specific view is opened, is there any way to clear the badge count that appears over the app icon?

This guy: http://i.stack.imgur.com/MxGbb.png ?

@dklinzing
Copy link
Author

In case anyone else has issues clearing the badge count, we did the following for iOS:

UIApplication.sharedApplication().applicationIconBadgeNumber = 0;

Also - if you're using Everlive (Telerik Platform backend services), you need to reset the push counter. I'm sure the process is similar on other push servers too.

var Everlive = require('./everlive.js');
var everlive = new Everlive({
apiKey: '[api key here]',
scheme: 'https'
});
everlive.push.clearBadgeNumber();

We put this code in the following application events:
application.launchEvent, application.resumeEvent

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant