Return to activity (but not to the end ())

as indicated in the header, how can I return to the running operation, but without calling the finish () function. I am primarily concerned about this because I do not know how to tell the Notification to return to the original action that created it when the user pulls out his notification bar and clicks on the notification. The tutorial on how to create a notification explains how to start a new action after clicking it.

Is there any Intent call that can do this? Thanks in advance!

+3
source share
1 answer

Use getIntent () instead of creating a new intent.

PendingIntent contentIntent = PendingIntent.getActivity(context, 0,  getIntent(), 0);
.....
notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent);
+3
source

All Articles