Skip to content

Instantly share code, notes, and snippets.

@vogella
Created July 1, 2016 11:49
Show Gist options
  • Save vogella/d3ded6ef0e30a89e6b05aa14538cc7e8 to your computer and use it in GitHub Desktop.
Save vogella/d3ded6ef0e30a89e6b05aa14538cc7e8 to your computer and use it in GitHub Desktop.
BroadcastReceiver updateReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
updateListContent();
}
};
IntentFilter f = new IntentFilter("ESGIBTNEUEDATEN");
@Override
public void onResume() {
super.onResume();
getContext().registerReceiver(updateReceiver, f);
}
@Override
public void onPause() {
super.onPause();
getContext().unregisterReceiver(updateReceiver);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment