I am downloading a file to the device external storage from my android app from a web server using DownloadManager
. I need to initiate another function on completion of this download. my file download code goes like this:
String url = "http://192.168.1.105/download/file.ext";
DownloadManager.Request request = new DownloadManager.Request(Uri.parse(url));
request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, "files.ext");
DownloadManager manager = (DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE);
final long downloadId = manager.enqueue(request);
please suggest how to get something like onDownloadComplete
.....