如何给计数器,如果一个以上的通知是有 [英] How to give counter if more than one Notifications are there
本文介绍了如何给计数器,如果一个以上的通知是有的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经实现PushNotification使用C2DM。我收到通知,C2DM也。我的问题是我想给一个计数器,当我得到一个以上的通知,我的意思是像你有一个通知(计)。我怎样才能实现这一点。
I have implemented PushNotification Using C2dm. I am getting notification from c2dm also. My problem is I want to give a counter when I get more than one notifications, I mean like "You have a Notification(count)". How can I implement this.
推荐答案
你可以做的数值设置成通知对象
you can do to set the number value into the Notification object
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/
http://developer.android.com/guide/topics/ UI /通知者/ notifications.html
这篇关于如何给计数器,如果一个以上的通知是有的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文