[英]Showing Multiple firebase Notification with Manage Job Queue
I am New in android Development Any one can guide me how I resolve it? 我是android开发的新手有人可以指导我如何解决它吗?
I Have Multiple Notification in My Android Project All are Customized with Broadcast-receiver and Service but now I am Confused to Manage same type of notification on same Time. 我在Android项目中有多个通知,所有通知都是通过广播接收器和服务自定义的,但现在我困惑于在同一时间管理相同类型的通知。
Right now I can access latest Notification only older with same type on same time notification has been overridden. 现在,我只能访问具有相同类型且在相同时间的通知已被覆盖的较早的最新通知。
You should define a unique id to your notification. 您应该为通知定义唯一的ID。
notificationManager.notify(UNIQUE_ID, notification);
It is common to use Date as UNIQUE_ID, to maintain its identity. 通常使用Date作为UNIQUE_ID来维护其身份。 In your activity you can receive your attributes like,
在您的活动中,您可以接收诸如
protected void onCreate(Bundle bundle){
super.onCreate(bundle);
String notificationAttribute = getIntent().getStringExtra("notificationAttribute",null);
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.