Interface BatchNotificationChannelsManager.NotificationChannelIdInterceptor

Enclosing class:
BatchNotificationChannelsManager

public static interface BatchNotificationChannelsManager.NotificationChannelIdInterceptor
Interface describing a channel ID interceptor for notifications displayed by Batch
  • Method Summary

    Modifier and Type
    Method
    Description
    getChannelId(BatchPushPayload payload, String deductedChannelId)
    Method that should return the notification channel id that should be Note that it might be called on any API level, even ones lower than Build.VERSION_CODES.O.
  • Method Details

    • getChannelId

      String getChannelId(BatchPushPayload payload, String deductedChannelId)
      Method that should return the notification channel id that should be Note that it might be called on any API level, even ones lower than Build.VERSION_CODES.O.

      If this method throws an exception, Batch will use the value of deductedChannelId.

      Parameters:
      payload - Full push payload. Read your custom payload as string values, using Bundle#getString(String) on BatchPushPayload#getPushBundle()
      deductedChannelId - Channel ID
      Returns:
      The channel ID to use for this notification. If you return null, deductedChannelId will be used.