我已经使用 C2dm 实现了 PushNotification。我也收到来自 c2dm 的通知。我的问题是当我收到多个通知时我想给出一个计数器,我的意思是“你有一个通知(计数)”。我该如何实现。
最佳答案
您可以将数字值设置到通知对象中
Notification notifyDetails = new Notification(R.drawable.alarm,intent.getExtras().getString(KEY_TITLE),System.currentTimeMillis());
notifyDetails.number = 1; ////// here you can pass the counter value which will so you the number
这是链接
http://developer.android.com/reference/android/app/Notification.html#number
http://developer.android.com/guide/topics/ui/notifiers/notifications.html
关于android - 如果有多个通知,如何提供计数器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7203541/