The SDK provides two different ways that you can override the default intent when someone taps on a push message received by your Android app:

  1. Change the screen that opens when the user taps the notification.
  2. Change the screen that opens based on custom logic, such as: if message A, go here; if message B go somewhere else.

  1. To change the screen that opens when a user taps the notification, use MarketingCloudConfig.builder() and set the activity.

  2. To use custom logic to determine which screen opens, provide your implementation of NotificationManager.NotificationLaunchIntentProvider when configuring the SDK using MarketingCloudConfig.Builder. Create and return the PendingIntent for the notification’s destination.

When using NotificationManager.NotificationLaunchIntentProvider, the value provided when calling MarketingCloudConfig$Builder.setNotificationRecipient will be ignored.

If you return a null intent, users still receive the notification, but nothing happens when they tap it. If you return a null notification builder, you won’t get any analytics for this notification.