Notification Builder

Defined in package com.scandit.datacapture.core.ui.notification

NotificationBuilder
class NotificationBuilder

Added in version 7.5.0

Use this object to construct instances of NotificationConfiguration.

NotificationBuilder()
NotificationBuilder(@NonNull String text,
        @NonNull String tag)

Added in version 7.5.0

Constructs a new notification builder. Text is the message that will be displayed in the notification. Tag is a string used to identify the notification.

withIcon(icon)
@NonNull NotificationBuilder withIcon(@NonNull ScanditIcon icon)

Added in version 7.5.0

Sets the icon that will be displayed in the notification.

withTextColor(textColor)
@NonNull NotificationBuilder withTextColor(int textColor)

Added in version 7.5.0

Sets the text color of the notification.

withBackgroundColor(backgroundColor)
@NonNull NotificationBuilder withBackgroundColor(int backgroundColor)

Added in version 7.5.0

Sets the background color of the notification.

withSwipeToDismiss(swipeToDismiss)
@NonNull NotificationBuilder withSwipeToDismiss(boolean swipeToDismiss)

Added in version 7.5.0

Sets whether the notification can be dismissed by swiping.

withNotificationStyle(notificationStyle)
@NonNull NotificationBuilder withNotificationStyle(
        NotificationStyle notificationStyle)

Added in version 7.5.0

Sets the style of the notification. This will override other settings like text color and background color.

build()
@NonNull NotificationConfiguration build()

Added in version 7.5.0

Builds a NotificationConfiguration object. Can be presented using the NotificationPresenter.