简体   繁体   English

如何计算推送通知并在主屏幕应用程序图标上显示它们

[英]How to count the push Notifications and display them on the home screen app icon

How to count the push Notifications and display them on the home screen app icon 如何计算推送通知并在主屏幕应用程序图标上显示它们

public void onReceive(Context context, Intent intent) { } public void onReceive(Context context,Intent intent){}

You can't display notification numbers in the App Icon. 您无法在应用程序图标中显示通知编号。 You can't change this icon at run-time. 您无法在运行时更改此图标。 Besides, this is an iOS paradigm (displaying the number of notifications in the icon), so you shouldn't do this on Android anyway even if it was possible. 此外,这是一个iOS范例(显示图标中的通知数量),所以即使可能,你也不应该在Android上这样做。

You can't. 你不能。 Android doesn't have any analogous to iOS's "badge count". Android与iOS的“徽章数量”没有任何相似之处。 My wife's Samsung displays Facebook notification count, but that's something that's built into TouchWiz and perhaps a special Facebook addition for Samsung phones. 我妻子的三星显示Facebook的通知数量,但这是TouchWiz内置的东西,也许是三星手机的特别Facebook添加。

暂无
暂无

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

相关问题 如何在Android的主屏幕上的我的应用程序图标上显示通知计数 - How to show Notification Count on My App Icon on Home Screen in Android 应用程序图标未显示在应用程序中(在主屏幕上) - App icon does not display in applications (on home screen) 如何在android中的工具栏图标中显示通知计数 - How to display count of notifications in toolbar icon in android 如何在主屏幕中显示浮动图标 - How To Display A Floating Icon In Home Screen 我无法在主屏幕上的应用程序图标上显示通知计数 - I am not able to display notification count on application icon in home screen 如何在android中显示本地推送通知(在主屏幕上的应用程序图标,如i-phone) - how to show local push notification (on app icon on home screen like i-phone) in android 如果应用程序已登录且在后台,然后单击主屏幕上的应用程序启动器图标,它将显示登录屏幕 - if app is login and its in background and click on app launcher icon from home screen it will display login screen 以编程方式安装Android应用程序时如何在主屏幕上添加图标? - How to add a icon on home screen while installing an android app programatically? 如何以编程方式在主屏幕应用程序图标android中设置徽章编号? - How set badge number in home screen app icon android programatically? 如何在主屏幕 android 上添加应用程序图标(react-native)? - How to add icon of the app on the home android screen (react-native)?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM