Reputation: 482
I am currently in Activity A. I receive notifications and I want to recreate the Activity A when I click on the notification (finish A and then create A again). Intent class doesn't seem to have a flag similar to PendingIntent.FLAG_CANCEL_CURRENT.
Upvotes: 0
Views: 209
Reputation: 482
I basically solved this by using onNewIntent()
For single top activity, when you click on the notification, onNewIntent will be called and you can call recreate() there.
Upvotes: 1