我想在我的App中为同一目的地创建多个PendingIntents
。就我而言,目的地是BroadcastReceiver
类,它将触发通知。整个通知是PendingIntent
内容的一部分。
但是我发现只有最后注册的{strong} 发送到PendingIntent
中的onReceive
。由于我无法检查关于BroadcastReceiver
的任何内容,因为它只有写接口,所以我可以确认至少创建了5个PendingIntent
具有不同的通知内容。但是只有一个进入PendingIntents
,这是最后一个。这意味着每个新的BroadcastReceiver
都会重写前一个数据。
有什么办法可以在相同的目的地但不同的正文中注册10个或更多PendingIntent
?
创建PendingIntents
进行通知的示例:
PendingIntent