Created
February 9, 2017 08:10
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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