【发布时间】:2013-10-16 14:25:03
【问题描述】:
任何人都知道我们如何以编程方式从应用程序中删除通知,该通知是使用待定意图调用的。
我曾经使用以下方法取消通知。
AlarmManager am=(AlarmManager)getSystemService(Context.ALARM_SERVICE);
Intent intent = new Intent(Display.this, TwoAlarmService.class);
PendingIntent pi = PendingIntent.getBroadcast(Display.this, AlarmNumber, intent, PendingIntent.FLAG_CANCEL_CURRENT);
am.cancel(pi);
但问题是已经触发但未从通知栏中删除的通知。
提前谢谢...
【问题讨论】:
-
您好,我不知道是否可以通过编程方式删除通知,但您可以确定用新通知覆盖旧通知。如果它满足您的要求,那么我可以在这里为您发布代码。请回复
-
不,实际上我有两个不同的通知,我已经取消了通知。
标签: android notifications android-notifications android-pendingintent