orkundzgn
orkundzgn

Reputation: 52

Android DownloadManager Cancel Button

I've implemented a AsyncTask to download .pdf files to the storage. I was able to create a custom notification and I added a button to cancel that download.

However, now I have to use Android's own DownloadManager to handle the job. When I start download, it creates a notification showing the progress but I couldn't customize the notification to add a cancel button and run remove(long) for it's onClick()

Since Google's apps uses downloadManager to download stuff and it has a button to cancel the download, there must be way to achieve.

Upvotes: 0

Views: 1104

Answers (1)

Twisted Lullaby
Twisted Lullaby

Reputation: 591

Android N added the cancel option on notification when using Download Manager. There are some posts about it: link 1, link 2.

Upvotes: 1

Related Questions