Android : Download already finished; skipping

on Friday, September 19, 2014


I am creating a downloadManager request and try to download files, everything works fine, until it started to skip downloads..


after looking at the logs I saw this



D/DownloadManager(16292): Download 4153 already finished; skipping


I guess it is somehow recognizing the download (url?) and skips it, for me this is not desireable, since I need redownload files sometimes since they are changed or just for my own testing.


how can I get around this behaviour?


code snippet:



dm = (DownloadManager) activity.getSystemService(activity.DOWNLOAD_SERVICE);

Request request = new Request(
Uri.parse( (String) params.get("url") ));

request.setVisibleInDownloadsUi(false);
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_HIDDEN);
enqueue = dm.enqueue(request);


Intent i = new Intent();
i.setAction(DownloadManager.ACTION_VIEW_DOWNLOADS);
activity.startActivity(i);

0 comments:

Post a Comment