Skip to content

Instantly share code, notes, and snippets.

@AliAsadi
Last active June 30, 2019 09:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AliAsadi/b5277793d574534c9bebbc2d58e4a2e4 to your computer and use it in GitHub Desktop.
Save AliAsadi/b5277793d574534c9bebbc2d58e4a2e4 to your computer and use it in GitHub Desktop.
protected void onDestroy() {
unregisterReceivers();
LocationManager.getInstance().unregister(this);
AppState.getInstance().setStateChangeListener(null);
LocalBroadcastManager.getInstance(getApplicationContext())
.unregisterReceiver(messageReciver);
super.onDestroy();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment