Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Download Manager Progress Not Visible in the Notification Area

I am downloading a file from url using Download Manager. And the file is downloaded successfully.

The problem

File is downloading silently, no notification in the notification area.

The download manager showed notification (with progressbar) on my device running on android 6.0. After i have updated my device to android 7.0 the download manager doesn't show any notification on the notification area.

Here is my code

Uri uri = Uri.parse("file://" + destination);

url = "http:....."; //Valid File URL

//Set up download manager request

DownloadManager.Request request = new DownloadManager.Request(Uri.parse(url));
request.setDescription("Downloading " + file_name);
request.setTitle("My Downloader");
request.setDestinationUri(uri); //URI is valid

//Start the download
DownloadManager manager = (DownloadManager) getContext()
                                .getSystemService(Context.DOWNLOAD_SERVICE);

Also adding request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE); is not helping my case.

Build Information

Here is my Gradle Build infformation.

minSdkVersion 22
targetSdkVersion 23
compileSdkVersion 25
buildToolsVersion "25.0.2"
like image 688
Christlin Panneer Avatar asked Sep 14 '25 00:09

Christlin Panneer


1 Answers

I was facing a similar problem that the file was downloading successfully but the progress was not visible in the notification area.

The issue was with notification visibility. Following line helped me solve it:

request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);

I hope this helps.

like image 157
Kunal Chaubal Avatar answered Sep 15 '25 15:09

Kunal Chaubal