Class DefaultInterceptor
-
- All Implemented Interfaces:
public abstract class DefaultInterceptor
-
-
Constructor Summary
Constructors Constructor Description DefaultInterceptor()
-
Method Summary
Modifier and Type Method Description booleanisNotificationIntercepted(Message message)Whether to intercept this local notification, typically used for custom notification display. PendingIntentonPendingIntent(PendingIntent pendingIntent, Intent intent)Callback when setting the local notification PendingIntent. booleanisHighPriorityMessage(Message message)Whether this is a high-priority message. NotificationChannelonRegisterChannel(NotificationChannel defaultChannel)Callback before registering the default notification channel. -
-
Method Detail
-
isNotificationIntercepted
boolean isNotificationIntercepted(Message message)
Whether to intercept this local notification, typically used for custom notification display.
- Parameters:
message- the message associated with the local notification- Returns:
true to intercept (SDK will not show the notification; caller handles it); false to let SDK show it.
-
onPendingIntent
PendingIntent onPendingIntent(PendingIntent pendingIntent, Intent intent)
Callback when setting the local notification PendingIntent. The app layer can modify the PendingIntent settings to customize notification click behavior. By default, clicking the notification navigates to the corresponding conversation page.
- Parameters:
pendingIntent- the SDK default PendingIntentintent- the intent carried by the PendingIntent.- Returns:
the PendingIntent to use for the local notification.
-
isHighPriorityMessage
boolean isHighPriorityMessage(Message message)
Whether this is a high-priority message. High-priority messages are exempt from global quiet hours and per-channel do-not-disturb, e.g. @ mention messages.
- Parameters:
message- the received message- Returns:
whether this is a high-priority message
-
onRegisterChannel
NotificationChannel onRegisterChannel(NotificationChannel defaultChannel)
Callback before registering the default notification channel. Use this to intercept and modify the default channel configuration, then return the modified channel.
- Parameters:
defaultChannel- the default notification channel- Returns:
the modified notification channel.
-
-
-
-