Include custom keys in the message payload sent with a push message. Your app can use this key to perform a custom function as dictated by the existence and value of the custom key sent in the payload.

The marketer must add the same custom key in the Administration section of MobilePush.

Depending on your use case, use one of these ways to access the custom keys sent in a notification:

  1. Use NotificationManager to register a NotificationMessageDisplayedListener.

  2. Access the custom keys in the payload bundle in MarketingCloudConfig.Builder#setNotificationLaunchIntentProvider.

  3. Access the custom keys in the payload bundle in MarketingCloudConfig.Builder#setNotificationBuilder.

  4. Access the custom keys in the activity’s intent bundle if you provide an alternate activity for notifications using MarketingCloudConfig.Builder#setNotificationRecipient().