getPushNotificationCompatBuilder

open fun getPushNotificationCompatBuilder(@NonNull context: Context, @NonNull defaultBuilder: NotificationCompat.Builder, @NonNull pushIntentExtras: Bundle, notificationId: Int): NotificationCompat.Builder

Get the builder instance used to generate the notification. If you're basing your builder on defaultBuilder, some methods might have undefined behaviour as Batch already calls many of them. Likewise, returning another instance of the builder than defaultBuilder's might result in loss of functionality if not reimplemented.

Return

A valid NotificationCompat.Builder instance, or null if you want to stop the display of that notification.

Parameters

context

Context. Will usually be a service context.

defaultBuilder

NotificationCompat builder that has been created and fully configured by Batch.

pushIntentExtras

Raw push intent extras. Read directly your custom payload values from the extras as string values, or use payloadFromReceiverExtras to extract Batch data from the extras.

notificationId

Notification id that will be used to post the notification. Result of getPushNotificationId.