安卓通知栏编号

标签 android notifications

我已经能够在 Android 模拟器上成功显示通知数量。但是,当我在实际的 Android 手机上使用它时,它不显示任何内容。关于为什么会有所不同有什么建议吗?

最佳答案

首先尝试将其设置为数字 1,然后设置更高。来自这里的建议:http://developer.android.com/guide/topics/ui/notifiers/notifications.html

number field

This value indicates the current number of events represented by the notification. The appropriate number is overlaid on top of the status bar icon. If you intend to use this field, then you must start with "1" when the Notification is first created. (If you change the value from zero to anything greater during an update, the number is not shown.)

关于安卓通知栏编号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3042189/

相关文章:

android - 我可以通过 Wi-Fi 将数据从 PC 推送到 Android 吗

android - 当应用程序从通知启动时,无法从 Intent 中读取额外内容

java - 收到 fcm 通知时更新回收器 View

iphone - 如何在另一个 View Controller 中调用 NSNotificationCenter 函数?

android - 使用 Retrofit 创建自定义 DELETE 方法

android - Cognito/S3 用户特定策略

android - 有没有办法检查哪个 list 导入了一些使用权限?

android - 除了versionCode之外,什么决定了应用程序是否可以在Android Market中更新?

android - NotificationCompat.Builder addAction 丢失了吗?

java - 通知后刷新服务中的 Activity