I'm trying to use android default download manager in my app, but problem is that i don't get any message in my app when download has been completed. Is there any way to solve this problem?
You need to register a BroadcastReceiver to know when it is completed:
registerReceiver(completionReceiver, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
The Receiver:
BroadcastReceiver completionReceiver = new BroadcastReceiver() {
public void onReceive(Context ctxt, Intent intent) {
//here You know the download is complete, do whatever You want to do
}
};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With