Created
May 12, 2020 20:41
-
-
Save javieranton-zz/33ad9d84658ffe55ee6f2a7fb5cf5aae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.groups; | |
import android.content.BroadcastReceiver; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.os.Bundle; | |
public class GroupsReceiver extends BroadcastReceiver { | |
@Override | |
public void onReceive(Context context, Intent arg1) { | |
try { | |
Bundle extras = arg1.getExtras(); | |
String receiverAction = extras.getString("action"); | |
switch (receiverAction) { | |
case "markNotifAsRead": | |
Intent dismissIntent = new Intent(context, your.namespace.GroupsJobIntentService.class); | |
dismissIntent.putExtras(extras); | |
your.namespace.GroupsJobIntentService.enqueueWork(context, dismissIntent); | |
break; | |
} | |
} catch (Exception ex) { | |
your.namespace.CN1AndroidApplication.traceError("Receiver onReceive error: " + ex.toString()); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment