Interface BatchNotificationChannelsManager.NotificationChannelIdInterceptor

  • Enclosing class:
    BatchNotificationChannelsManager

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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getChannelId​(BatchPushPayload payload, java.lang.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 Detail

      • getChannelId

        @Nullable
        java.lang.String getChannelId​(@NonNull
                                      BatchPushPayload payload,
                                      java.lang.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 BaseBundle.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.