I know this is an old question, but why don't you use the broadcast to get the intent, which then starts all receivers to register? (Requires to post something more accurate than the current answer gives)
In the response snippets / actions you put this:
public class PanicFragment extends Fragment { IntentFilter killFilter = new IntentFilter("your.app.name.some.awesome.action.title"); BroadcastReceiver kill = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { context.unregisterReceiver(receiver);
(Remember to register receivers when creating a fragment / activity)
And in your service or other activity or whatever you want:
private void callThisToUnregisterAllYourReceivers(Context context) { Intent killThemAll = new Intent(); killThemAll.setAction("your.app.name.some.awesome.action.title"); context.sendBroadcast(killThemAll); }
I hope this was useful anyway.
source share