【发布时间】:2018-02-07 09:42:49
【问题描述】:
我已经为我的 android 应用实现了推送通知。我可以在通知栏中显示多个通知,但一次只能显示一个通知。
我认为是标志类型的问题
Intent.FLAG_ACTIVITY_CLEAR_TOP
Intent.FLAG_ACTIVITY_SINGLE_TOP
和
PendingIntent.FLAG_CANCEL_CURRENT
这是我的代码,请告诉我我要设置什么类型的标志
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP |
Intent.FLAG_ACTIVITY_SINGLE_TOP);
final PendingIntent resultPendingIntent =
PendingIntent.getActivity(
mContext,
0,
intent,
PendingIntent.FLAG_CANCEL_CURRENT
);
【问题讨论】:
-
你为演出通知做了什么?
-
请出示您的通知管理器代码,有问题
-
另请阅读This。
-
我的解决方案有效吗?
标签: android push-notification android-push-notification