package com.hewgill.android.nzsldict;

import android.app.DownloadManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class DownloadReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        String action = intent.getAction();
        if (DownloadManager.ACTION_NOTIFICATION_CLICKED.equals(action)) {
            Intent startIntent = new Intent(context, FavouritesActivity.class);
            startIntent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
            context.startActivity(startIntent);
        }
    }
}

@@ -172,16 +172,45 @@
 .Intent;
+%0Aimport android.widget.Toast;
 %0A%0Apublic
@@ -649,16 +649,206 @@
 ntent);%0A
+            return;%0A        %7D%0A%0A        if (DownloadManager.ACTION_DOWNLOAD_COMPLETE.equals(action)) %7B%0A            Toast.makeText(context, %22Download completed?%22, Toast.LENGTH_SHORT).show();%0A%0A
         

Add stub to indicate that the download has completed; this needs to be raised to the favourites activity