如何在Facebook等应用程序图标上显示通知计数? [英] How to show notification count on app icon like Facebook?
问题描述
我想在未打开应用程序时在应用程序图标上显示未读通知计数。
不幸的是,您无法在所有android设备上实现该功能。
某些制造商(例如,三星或索尼)已将此功能包含在其自定义的Android启动器中。一些第三方发射器(例如Nova Launcher)也包括实现此目的的API。
一些相关帖子,以获取更多信息:
- Facebook如何在Android中的应用程序图标上添加徽章编号?
- https://stackoverflow.com/questions / 18205569 / does-samsung-modify-its-android-roms-to-have-badge-on-email-and-sms-icons?rq = 1
- < a href = https://stackoverflow.com/questions/19086189/adding-notification-badge-on-app-icon-in-android?rq=1>在Android中的应用程序图标上添加通知徽章
- 如何连接与三星手机上的BadgeProvider一起添加计数到应用程序图标?
- 如何在Sony Xperia设备上向应用程序图标添加通知徽章/计数?
- 如何制作Android上的应用程序徽章?
- 如何在应用启动器图标中显示通知计数
可能有用的库:
以及更多...
I want to show unread notification count on my app icon when app is not opened. this post seems to be close but it is 3 years old. Has there been any change on this or I should go with solutions provided in the accepted answer?
Unfortunately you cant achieve this for all android devices.
Certain manufacturers (e.g. Samsung or Sony) have included this functionality into their customised Android launchers. Also some 3rd-party launchers (e.g. Nova Launcher) have included an API to accomplish this.
Some related posts for more information:
- How does Facebook add badge numbers on app icon in Android?
- https://stackoverflow.com/questions/18205569/does-samsung-modifies-its-android-roms-to-have-badges-on-email-and-sms-icons?rq=1
- adding notification badge on app icon in android
- How to interface with the BadgeProvider on Samsung phones to add a count to the app icon?
- How to add a notification badge/count to application icon on Sony Xperia devices?
- How to make application badge on android?
- How to display count of notifications in app launcher icon
And some libraries that might be helpful:
and more...
这篇关于如何在Facebook等应用程序图标上显示通知计数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!