An action takes users directly from the notification to an Activity in your application, where they can look at the event that caused the notification or do further work. Inside a notification, the action itself is defined by a PendingIntent containing an Intent that starts an Activity in your application.
How you construct the PendingIntent depends on what type of Activity you're starting. When you start an Activity from a notification, you must preserve the user's expected navigation experience.Part of designing a notification is preserving the user's expected navigation experience.There are two general situations:
- Regular - You're starting an Activity that's part of the application's normal workflow
- Special - The user only sees this Activity if it's started from a notification. In a sense, the Activity extends the notification by providing information that would be hard to display in the notification itself.
That is your answer, you can use share preference as a middle man to store small information linking your activation's to each activity.