Question

i am working with a download manager in android. i used download manager class for this purpose. one button to start and another to stop it. i am also using a progress bar to show percentage downloaded. everything work fine but when i click on stop button it does not stop in notification bar. i have used dm.remove(id) method but it does not work. callin download

dm = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);
     request = new Request(
            Uri.parse("url"));
    enqueue = dm.enqueue(request);
     downloadId = dm.enqueue(request);

only problem is with removing or stop it.

dm.remove(downloadId);

any idea where the problem is please!!!

Was it helpful?

Solution

dm.remove(id) should remove it. I am using it and I had not problem so far. Are you downloading 1 thing at a time?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top