Skip to main content
Register a notification interceptor after initializing the Notifly Android SDK. The interceptor can adjust how a notification looks or behaves before the SDK displays it.

Interceptor interface

Implement postBuild in INotificationInterceptor. It receives two arguments.
  • builder: NotificationCompat.Builder. Modify this builder to change how the notification looks or behaves.
  • notification: IPushNotification. Use its notification data to decide which changes to apply.
Return the modified builder from postBuild.
On Android 8.0 (API level 26) and later, notification channel settings take precedence. For example, a sound set on the channel can override builder.setSound(). Check the notification channel when changing these settings.