DownloadManager 和 Android 7.0 取消功能

DownloadManager and Android 7.0 Cancel feature

Android 如果您使用 ,N 会直接在下载通知中添加 "cancel" 功能下载管理器.

他们是否添加了任何 intent-filter 操作来捕获此事件?

此时 DownloadManager 仅获得 3 个动作:

我尝试使用 ACTION_NOTIFICATION_CLICKED 手动取消我的下载,但如果用户点击 "Cancel" 按钮,我不会收到通知。

如果用户点击取消,DownloadManager 应该向您的应用程序发送 ACTION_DOWNLOAD_COMPLETE 广播。但它是 Android N 中的一个已知错误,Android 团队正在处理它:

Issue 219785: DownloadManager dose't send ACTION_DOWNLOAD_COMPLETE broadcast while click CANCEL button on notification to cancel the downloading.

我们必须等待修复!