0

I'm using open source project for download files

https://github.com/JiboStore/DownloadProvider

This library worked correctly,
For example this code starting download and show list with pause/resume feature:

DownloadManager mDownloadManager = new DownloadManager( getContentResolver(), getPackageName()); String url = "...."; Uri srcUri = Uri.parse(url); DownloadManager.Request request = new Request(srcUri); request.setDestinationInExternalPublicDir("MyApp" + File.separator + "Download", "test.txt"); request.setDescription("For test"); request.setTitle("test.txt"); mDownloadManager.enqueue(request);

But I don't know how to use pause/resume within my activity or access to the contents list of downloads for diagnosis item has been paused.

1 Answers1

0

You must in the first access to your downID within database, then handle pause/resume with this:

mDownloadManager.pauseDownload(downID);
mDownloadManager.resumeDownload(downID);
Naruto Uzumaki
  • 2,019
  • 18
  • 37
  • Thank's for answer, I had seen the above method but did not know how to get downID. I now realized enqueue method return id. Many thanks for your attention, dear friend. – Farzad Rohani Nov 24 '14 at 07:20