简体   繁体   中英

Push notification badge not disappearing

I implemented push notification. It works well apart from the badge that always shows "1".

My code looks like this:

var push = new Ionic.Push({
"debug": true
});
push.register(function(token) {
console.log("Device token:",token.token);
//Here I make an http post to my server to store device token
push.saveToken(token); // persist the token in the Ionic Platform
});

Whats wrong? I tried to google "ionic badge remove" but no good hits. What I understood badge should disappear as soon as you click on the app. But it doesn't (Im testing on a real iphone 6).

不确定是否可以清除此类通知,我知道解决此问题的方法是使用本地通知插件来处理您的推送通知。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM