标签: android android-notifications
我收到了NotificationCompat.Builder mBuilder的通知,并且在将.setAutoCancel(true);传递给它时取消了,但我希望在点击其中一个给定按钮.addAction(R.drawable.ic_launcher, "Ignore", pIntent2)时取消,目前它没有取消,我该怎么办?
NotificationCompat.Builder mBuilder
.setAutoCancel(true);
.addAction(R.drawable.ic_launcher, "Ignore", pIntent2)
答案 0 :(得分:2)
要清除特定通知,您可以这样做,
notificationManager.cancel(notification_id);