0
DownloadManager.Request downloadRequest = new DownloadManager.Request(Uri.parse(f_url[0]));
                downloadRequest.setTitle(Application.getApplication().getString(R.string.app_name));
                downloadRequest.setDescription("Saving..");
                downloadRequest.setDestinationInExternalPublicDir(path,filename);
                downloadRequest.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
                DownloadManager manager = (DownloadManager) Application.getApplication().getSystemService(Context.DOWNLOAD_SERVICE);
                manager.enqueue(downloadRequest);

If i set download to external directory above code does not shows the notification when file download is completed(It is showing while in progress) .

When i commented the below code line, its working properly

//downloadRequest.setDestinationInExternalPublicDir(path,filename);

Why this is happening and is there any way to resolve.

Arunkrishna
  • 416
  • 1
  • 4
  • 18

1 Answers1

0

you should add DOWNLOAD_WITHOUT_NOTIFICATION permission in andoroidManifest.xml , please see this :

https://stackoverflow.com/a/33753065/3471640

Hatami
  • 21
  • 2
  • 5