Skip to content

Instantly share code, notes, and snippets.

@arturaz
Created October 30, 2015 07:55
Show Gist options
  • Save arturaz/fcb7ad805f4085b3859e to your computer and use it in GitHub Desktop.
Save arturaz/fcb7ad805f4085b3859e to your computer and use it in GitHub Desktop.
package com.tinylabproductions.tbsgame.notifications;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
public class LaunchMuteForDialogReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
context.startActivity(
new Intent(context, LaunchMuteForDialogActivity.class)
.setAction(intent.getAction())
.setFlags(
Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT |
Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK
)
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment