Rafi Panoyan Rafi Panoyan - 3 months ago 61
Android Question

DownloadManager and Android 7.0 Cancel feature

Android N brought the "cancel" feature directly on the download notification if you're using the DownloadManager.

Did they add any intent-filter action to catch this event ?

At this point DownloadManager gets only 3 actions :


  • ACTION_DOWNLOAD_COMPLETE

  • ACTION_NOTIFICATION_CLICKED

  • ACTION_VIEW_DOWNLOADS



I tried to use
ACTION_NOTIFICATION_CLICKED
to cancel manually my download but if the user clicks on the "Cancel" button, I'm not notified.

Answer

The DownloadManager should send ACTION_DOWNLOAD_COMPLETE broadcast to your app if user click on Cancel. But it is a known bug in Android N, Android team is working on it:

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

We have to wait for fix!

Comments