Android: Download Manager

后端 未结 3 545
我在风中等你
我在风中等你 2021-01-14 21:48

I want to implement a solution where I want to catch the android.intent.action.DOWNLOAD_COMPLETED intents from the Android Market App i.e after the download of

3条回答
  •  逝去的感伤
    2021-01-14 22:25

    First register the reciever

    registerReceiver(onComplete, 
    new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
    

    And set a BroadcastReciever to capture the event.

    BroadcastReceiver onComplete=new BroadcastReceiver() {
            public void onReceive(Context ctxt, Intent intent) {
                // run your action here
            }
        };
    

提交回复
热议问题