Aju*_*Aju 5 notifications android push-notification
我已经使用C2dm实现了PushNotification.我也收到来自c2dm的通知.我的问题是,当我收到多个通知时,我想给一个计数器,我的意思是"你有一个通知(计数)".我该如何实现呢.
您可以将数值设置为Notification对象
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
Run Code Online (Sandbox Code Playgroud)
链接在这里
http://developer.android.com/reference/android/app/Notification.html#number
http://developer.android.com/guide/topics/ui/notifiers/notifications.html
| 归档时间: |
|
| 查看次数: |
14464 次 |
| 最近记录: |