【发布时间】:2015-05-25 18:14:48
【问题描述】:
我有一个推送通知应用。 我创建了点击通知的意图:
Intent open = new Intent();
open.setAction("com.bupyc.pushall.app.OPEN");
open.putExtra("url", url);
open.putExtra("lid", lid);
open.putExtra("regId", regId);
PendingIntent contentIntent = PendingIntent.getBroadcast(this.getApplicationContext(), 0, open, PendingIntent.FLAG_CANCEL_CURRENT);
在清单中
<receiver android:name=".OpenBroadcastReceiver">
<intent-filter>
<action android:name="com.bupyc.pushall.app.OPEN" />
</intent-filter>
</receiver>
但如果我发送更多 1 个通知意图将不起作用。它仅适用于第一次通知
如果“PendingIntent.FLAG_CANCEL_CURRENT”有问题,如何意图多个广播意图与其他网址、盖子额外内容?
【问题讨论】:
标签: android android-intent notifications push-notification