简体   繁体   English

推送通知徽章不消失

[英]Push notification badge not disappearing

I implemented push notification. 我实现了推送通知。 It works well apart from the badge that always shows "1". 除了始终显示“ 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. 我试图用Google搜索“删除离子徽章”,但没有成功。 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). 但事实并非如此(我正在真实的iPhone 6上进行测试)。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 IBM Worklight:推送通知和徽章 - IBM Worklight: Push Notification and Badge Android 在主屏幕上推送通知徽章计数器 - Android push notification badge counter on Home Screen 在具有Firebase的Android推送通知中设置徽章计数? - Set Badge Count in Android Push Notification with Firebase? 自定义 Firebase 推送通知未显示 Android 通知徽章点 - Android notification badge dot not showing for custom firebase push notification 如何在后台在Android应用程序图标上计算推送通知消息徽章 - How to count Push notification message badge on android app icon in background 如何在三星设备中的应用程序图标徽章上推送通知消息计数 - how to push notification message count on app icon badge in samsung devices 使用Xamarin表单为Android和iOS设置推送通知徽章时遇到问题 - Trouble setting push notification badge for Android and iOS using Xamarin Forms 如何以编程方式在Android上的应用程序图标上显示推送通知徽章计数? - How to show push notification badge count on app icon in android programmatically? 取消推送通知并打开应用程序时如何增加计数徽章? - How to increase the count badge when push notification recevied and app is open? 如何在Android中为所有设备实现推送通知徽章 - How to achieve push notification badge in android for all devices
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM