Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DownloadManager.ACTION_DOWNLOAD_COMPLETE
- BroadcastReceiver receiver = new BroadcastReceiver() {
- @Override
- public void onReceive(Context context, Intent intent) {
- String action = intent.getAction();
- if (action.equals(DownloadManager.ACTION_DOWNLOAD_COMPLETE) ){
- // do something
- }
- }
- registerReceiver(receiver, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
- public class MyDownloadCompleteReceiver extends BroadcastReceiver {
- @Override
- public void onReceive(Context context, Intent intent) {
- }
- }
- <receiver android:enabled="true"
- android:name="MyDownloadCompleteReceiver"
- android:label="downloadCompleteReceiver">
- <intent-filter>
- <action android:name="android.intent.action.DOWNLOAD_COMPLETE" />
- </intent-filter>
- </receiver>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement