Last active
September 24, 2018 14:12
-
-
Save gbzarelli/16c34c1a153d915442214b469aef4bfe to your computer and use it in GitHub Desktop.
Intent.FLAG_ACTIVITY_CLEAR_TOP on Notification
This file contains hidden or 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
val intent = Intent(ChatActivity.ACTION_VIEW) | |
intent.putExtra(ChatActivity.PARAM_OBJECT, group) | |
intent.flags = Intent.FLAG_ACTIVITY_CLEAR_TOP | |
val pendingIntent = PendingIntent | |
.getActivity(context, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT) | |
// Activities: A(Main), B e C - O codigo acima gera uma nova activity B na mesma task, excluindo a B, C anterior. | |
// Manifest: Main activity: android:launchMode="singleTask" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment