NotificationConfig

class NotificationConfig(@DrawableRes smallIcon: Int, @DrawableRes largeIcon: Int, @ColorRes notificationColor: Int, tone: String?, isMultipleNotificationInDrawerEnabled: Boolean, isBuildingBackStackEnabled: Boolean, isLargeIconDisplayEnabled: Boolean)

Notification Configuration object.

Author

Umang Chamaria

Since

11.0.00

Parameters

smallIcon

Resource-Id for the Notification Small icon.

Guideline: Notification small icon should be flat, pictured face on, and must be white on a transparent background.

largeIcon

Resource-Id for the Notification Large Icon

notificationColor

Set the color for notification.

tone

File name of the sound file which should be played whenever notification is received on the device. The sound file should be present in the raw folder of your application.

Note: This is used only for Android N and below devices.

isMultipleNotificationInDrawerEnabled

By default, the SDK shows only one notification at a given point in time, existing notification is updated with the new notification. If set to true new notifications would be shown separately.

isBuildingBackStackEnabled

By default MoEngage SDK synthesis the back-stack from the manifest when redirecting user on push click. If set to false SDK would not synthesis a back-stack.

isLargeIconDisplayEnabled

false if you don't want to show the notification large icon on Android Lollipop and above devices, else true.

Constructors

NotificationConfig
Link copied to clipboard
fun NotificationConfig(@DrawableRes smallIcon: Int, @DrawableRes largeIcon: Int)
NotificationConfig
Link copied to clipboard
fun NotificationConfig()
NotificationConfig
Link copied to clipboard
fun NotificationConfig(@DrawableRes smallIcon: Int, @DrawableRes largeIcon: Int, @ColorRes notificationColor: Int, tone: String?, isMultipleNotificationInDrawerEnabled: Boolean, isBuildingBackStackEnabled: Boolean, isLargeIconDisplayEnabled: Boolean)

Functions

toString
Link copied to clipboard
open override fun toString(): String

Properties

isBuildingBackStackEnabled
Link copied to clipboard
var isBuildingBackStackEnabled: Boolean

If false sdk will not synthesize back-stack for the notification's click action.

isLargeIconDisplayEnabled
Link copied to clipboard
var isLargeIconDisplayEnabled: Boolean

If true notification large icon will be shown on Lollipop and above devices.

isMultipleNotificationInDrawerEnabled
Link copied to clipboard
var isMultipleNotificationInDrawerEnabled: Boolean

If true show multiple notification in the drawer, else show single notification.

largeIcon
Link copied to clipboard
var largeIcon: Int

Resource-id for push-notification large icon

notificationColor
Link copied to clipboard
var notificationColor: Int

Color resource for push-notification icon.

smallIcon
Link copied to clipboard
var smallIcon: Int

Resource-id for push-notification small icon

tone
Link copied to clipboard
var tone: String?

Notification tone for android Oreo and below devices.