0

Is there any way to set up a PendingIntent with the download manager? Or the DownloadManager.Request? I'm sending the user a notification in the toolbar about the download with this:

request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);

request is initialized lik this:

DownloadManager.Request request = new DownloadManager.Request(Uri.parse(url));

I need it so that when the user clicks this notification they are brought to and activity or where the file was downloaded.

gnuanu
  • 2,252
  • 3
  • 29
  • 42
Connor Black
  • 6,921
  • 12
  • 39
  • 70

1 Answers1

1

I think your question is answered in this question.

That is, watch for ACTION_NOTIFICATION_CLICKED and ACTION_DOWNLOAD_COMPLETE actions.

If you need more control you could use your own notification, updating it with your PendingIntent when the download is complete.

Community
  • 1
  • 1
roflharrison
  • 2,300
  • 23
  • 26