Currently I am using below code snippet to download a file using DownloadManager
:
String servicestring = Context.DOWNLOAD_SERVICE;
DownloadManager downloadmanager;
downloadmanager = (DownloadManager) getSystemService(servicestring);
Uri uri = Uri
.parse("some url here");
DownloadManager.Request request = new Request(uri);
Using this code I am getting below notification.
My question is, can we add some cross button in this notification so that if user click that button it will cancel download?
Expected output:
(user must be able to cancel download when click on this red cross icon)
Please suggest some way if any. Thank you
from Can we have Custom Notification for android.os.DownloadManager?
No comments:
Post a Comment