gpt4 book ai didi

android - NotificationManager 的多重通知

转载 作者:行者123 更新时间:2023-12-02 08:19:29 25 4
gpt4 key购买 nike

目前我通知用户为 -

mNotificationManager.notify("My App Name",1212,notification);

这很好用。但是它在状态栏中只显示一个图标,尽管我在不同时间发送了多个通知。

我想为每个通知显示图标(即 3 个图标)。

我不确定这是否可能。有什么线索吗?

最佳答案

试试这个:

mNotificationManager.notify("My App Name",(int)(Math.random() * 101),notification);

*相同的通知更改始终是最后一个

*不同的id创建一个新的通知

关于android - NotificationManager 的多重通知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38565741/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com