【发布时间】:2017-01-05 11:40:10
【问题描述】:
根据specification,.setDeleteIntent(pendingIntent) 与两个动作相关联(从通知栏清除所有事件和滑动等用户动作)。
我的要求是当用户触摸通知栏上出现的通知时,必须转发到NotificationsList.class。这是通过我的 pendingInent 完成的:
PendingIntent sendPendingIntent = PendingIntent.getActivity(context, reminderId, new Intent(context, NotificationsList.class), PendingIntent.FLAG_UPDATE_CURRENT);
但是,在单击 CLEAR 按钮时,用户不得被导航到应用程序。使用.setDeleteIntent(pendingIndent) 我无法满足第二个要求。用户仍被导航到 NotificationsList.class。
有没有办法以编程方式将 CLEAR 按钮触发的所有通知事件 CLEAR 与用户操作(如触摸或滑动通知栏上的特定通知)区分开来?
【问题讨论】:
-
您找到问题的答案了吗?您需要更多帮助吗?如果你这样做,请告诉我!
-
兄弟你还需要帮助吗?为什么你不接受任何答案?
-
如果您找到问题的答案,请接受下面的一个,或修改您的问题,以便我可以为您提供更多帮助!
标签: android notifications android-notification-bar