android - 多个notification通知栏一个小图标如何实现
高洛峰
高洛峰 2017-04-17 17:38:14
0
3
507

notificationmanager弹出一个通知就会显示一个小图标,如何让一个应用程序的通知只在屏幕上面只显示一个小图标,如微信那种的

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(3)
伊谢尔伦

Each notification has an ID and can also be canceled.
Every time you send a new notification, cancel the old notification, so that there is only one notification icon on the notification bar.

伊谢尔伦

When NotificationManager calls notify, one parameter is id. If the ids are the same, only one will be displayed (the latter one will update the previous one). If the ids are different, multiple ones will be displayed.

大家讲道理

Just use the same id, but then the previous notification will be replaced. With the concept of group notification in Android N, your problem will be easily solved.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template