Skip to content

Instantly share code, notes, and snippets.

@codeInBit
Created February 9, 2017 08:10
Show Gist options
  • Save codeInBit/7aa1f24efc6409a7d665088423a8bb3b to your computer and use it in GitHub Desktop.
Save codeInBit/7aa1f24efc6409a7d665088423a8bb3b to your computer and use it in GitHub Desktop.
Below snippet helps replace current intent to deliver new extras from notification if the app is currently running
@Override
protected void onNewIntent(Intent intent) {
//needed to receive a new intent in case the activity is already running when message arrives
setIntent(intent);
super.onNewIntent(intent);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment