Package com.leanplum
Interface LeanplumPushNotificationCustomizer
-
public interface LeanplumPushNotificationCustomizerImplement LeanplumPushNotificationCustomizer to customize the appearance of notifications.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcustomize(android.app.Notification.Builder builder, android.os.Bundle notificationPayload, android.app.Notification.Style notificationStyle)Implement this method to support 2 lines of text in BigPicture style push notification, otherwise implementcustomize(NotificationCompat.Builder, Bundle)and leave this method empty.voidcustomize(androidx.core.app.NotificationCompat.Builder builder, android.os.Bundle notificationPayload)Implement this method to customize push notification.
-
-
-
Method Detail
-
customize
void customize(androidx.core.app.NotificationCompat.Builder builder, android.os.Bundle notificationPayload)Implement this method to customize push notification. Please callLeanplumPushService.setCustomizer(LeanplumPushNotificationCustomizer)to activate this method. Leave this method empty if you want to support 2 lines of text in BigPicture style push notification and implementcustomize(Notification.Builder, Bundle, Notification.Style)- Parameters:
builder- NotificationCompat.Builder for push notification.notificationPayload- Bundle notification payload.
-
customize
void customize(android.app.Notification.Builder builder, android.os.Bundle notificationPayload, @Nullable android.app.Notification.Style notificationStyle)Implement this method to support 2 lines of text in BigPicture style push notification, otherwise implementcustomize(NotificationCompat.Builder, Bundle)and leave this method empty. Please callLeanplumPushService.setCustomizer(LeanplumPushNotificationCustomizer, boolean)with true value to activate this method.- Parameters:
builder- Notification.Builder for push notification.notificationPayload- Bundle notification payload.notificationStyle- - Notification.BigPictureStyle or null - BigPicture style for current push notification. Call ((Notification.BigPictureStyle) notificationStyle).bigLargeIcon(largeIcon) if you want to set large icon on expanded push notification. If notificationStyle wasn't null it will be set to push notification. Note: If you call notificationStyle = new Notification.BigPictureStyle() or other Notification.Style - there will be no support 2 lines of text on BigPicture push and you need to call builder.setStyle(notificationStyle) to set yours expanded layout for push notification.
-
-