目前我通知用户为-
mNotificationManager.notify("My App Name",1212,notification);这工作得很好。但它只在状态栏中显示一个图标,尽管我在不同的时间发送了多个通知。
我想显示每个通知的图标(即3个图标)。
我不确定这是否可能。有什么线索吗?
发布于 2016-07-25 18:51:56
试试这个:
mNotificationManager.notify("My App Name",(int)(Math.random() * 101),notification);*通知更改时相同的id始终是最后一个
*不同id创建新通知
发布于 2016-07-25 18:59:23
根据notify documentation的说法,如果你想始终使用相同的3个通知,试着使用不同的标签。标签和id的组合使得通知“覆盖”了之前的通知。
mNotificationManager.notify("My App Name 1",1212,notification);
mNotificationManager.notify("My App Name 2",1212,notification);
mNotificationManager.notify("My App Name 3",1212,notification);或
mNotificationManager.notify("My App Name",1212,notification);
mNotificationManager.notify("My App Name",1213,notification);
mNotificationManager.notify("My App Name",1214,notification);https://stackoverflow.com/questions/38565741
复制相似问题