

Through Intent we can move from one activity to another activity and Intent can also be used to pass the data from one activity to another activity. In this tutorial, we will learn how to use Intent and then we will pass the data using Intent from one activity to another. Intent.putExtra(NotificationConstants.EXTRA_NOTIFICATION_INFO_ACTION_INDEX, actionIndex) Ĭontext, PENDING_INTENT_REQUEST_CODE, intent, PendingIntent.Passing data between Activities using Intent in Android NotificationConstants.EXTRA_NOTIFICATION_INFO_WEBAPK_PACKAGE, webApkPackage) Intent.putExtra(NotificationConstants.EXTRA_NOTIFICATION_INFO_TAG, tag) Intent.putExtra(NotificationConstants.EXTRA_NOTIFICATION_INFO_PROFILE_INCOGNITO, incognito) Intent.putExtra(NotificationConstants.EXTRA_NOTIFICATION_INFO_PROFILE_ID, profileId) Intent.putExtra(NotificationConstants.EXTRA_NOTIFICATION_INFO_ORIGIN, origin) Intent.putExtra(NotificationConstants.EXTRA_NOTIFICATION_ID, notificationId)

Intent intent = new Intent(action, intentData) Uri intentData = makeIntentData(notificationId, origin, actionIndex) String origin, String profileId, boolean incognito, String tag, Private PendingIntent makePendingIntent(Context context, String action, String notificationId, * actionIndex The zero-based index of the action button, or -1 if not applicable. * the notification is not associated with a WebAPK.

* webApkPackage The package of the WebAPK associated with the notification. * incognito Whether the profile was in incognito mode. * profileId Id of the profile to which the notification belongs. * origin The origin to whom the notification belongs. * notificationId The id of the notification. * action The action this pending intent will represent. * context An appropriate context for the intent class and broadcast.

* NotificationJobService#getJobExtrasFromIntent(Intent)}. * All parameters set here should also be set in * Returns the PendingIntent for completing |action| on the notification identified by the data
