Class NotificationData
-
- All Implemented Interfaces:
public class NotificationDataNotification builder.
-
-
Field Summary
Fields Modifier and Type Field Description public CharSequencetitlepublic CharSequencesubtitlepublic CharSequencebodypublic DrawableattachmentBackgroundpublic StringattachmentUrlpublic Drawableattachmentpublic List<Sticker>stickerspublic StringiconUrlpublic IntegericonResIdpublic DrawableiconTopRightpublic IntegerautoDismissPeriodSecspublic List<out c<out AppComponent>>validScreenspublic Function1<in View, Unit>onClickTopRightIconpublic Function1<in View, Unit>onClick
-
Constructor Summary
Constructors Constructor Description NotificationData()
-
Method Summary
Modifier and Type Method Description CharSequencegetTitle()NotificationDatasetTitle(@Nullable() CharSequence title)Sets the title. CharSequencegetSubtitle()NotificationDatasetSubtitle(@Nullable() CharSequence subtitle)Sets the subtitle. CharSequencegetBody()NotificationDatasetBody(@Nullable() CharSequence body)Sets the body. DrawablegetAttachmentBackground()NotificationDatasetAttachmentBackground(@Nullable() Drawable attachmentBackground)Sets the background for the attachment. StringgetAttachmentUrl()NotificationDatasetAttachmentUrl(@Nullable() String attachmentUrl)Sets the attachment URL. DrawablegetAttachment()NotificationDatasetAttachment(@Nullable() Drawable attachment)Sets the attachment. List<Sticker>getStickers()NotificationDatasetStickers(@Nullable() List<Sticker> stickers)Sets the stickers. StringgetIconUrl()NotificationDatasetIconUrl(@NonNull() String iconUrl)Sets the icon URL. IntegergetIconResId()NotificationDatasetIconResId(@Nullable() Integer iconResId)Sets the icon. DrawablegetIconTopRight()NotificationDatasetIconTopRight(@Nullable() Drawable iconTopRight)Sets the icon on the top right corner of the notification. IntegergetAutoDismissPeriodSecs()NotificationDatasetAutoDismissPeriodSecs(@Nullable() Integer autoDismissPeriodSecs)Sets the auto dismiss period. List<out c<out AppComponent>>getValidScreens()NotificationDatasetValidScreens(@Nullable() List<out c<out AppComponent>> validScreens)Sets valid screens for the notification. Function1<in View, Unit>getOnClickTopRightIcon()NotificationDatasetOnClickTopRightIcon(@Nullable() Function1<in View, Unit> onClickTopRightIcon)Sets the callback for the notification top right corner icon onClick action. Function1<in View, Unit>getOnClick()NotificationDatasetOnClick(@Nullable() Function1<in View, Unit> onClick)Sets the callback for the notification onClick action. -
-
Method Detail
-
getTitle
CharSequence getTitle()
- Returns:
Title of the notification.
-
setTitle
NotificationData setTitle(@Nullable() CharSequence title)
Sets the title.
- Parameters:
title- Title.- Returns:
NotificationData for chaining.
-
getSubtitle
CharSequence getSubtitle()
- Returns:
Subtitle of the notification.
-
setSubtitle
NotificationData setSubtitle(@Nullable() CharSequence subtitle)
Sets the subtitle.
- Parameters:
subtitle- Subtitle.- Returns:
NotificationData for chaining.
-
getBody
CharSequence getBody()
- Returns:
Body of the notification.
-
setBody
NotificationData setBody(@Nullable() CharSequence body)
Sets the body.
- Parameters:
body- Body.- Returns:
NotificationData for chaining.
-
getAttachmentBackground
Drawable getAttachmentBackground()
- Returns:
Attachment background Drawable of the notification.
-
setAttachmentBackground
NotificationData setAttachmentBackground(@Nullable() Drawable attachmentBackground)
Sets the background for the attachment.
- Parameters:
attachmentBackground- Background Drawable of the attachment.- Returns:
NotificationData for chaining.
-
getAttachmentUrl
String getAttachmentUrl()
- Returns:
Attachment URL of the notification.
-
setAttachmentUrl
NotificationData setAttachmentUrl(@Nullable() String attachmentUrl)
Sets the attachment URL.
- Parameters:
attachmentUrl- URL of the attachment.- Returns:
NotificationData for chaining.
-
getAttachment
Drawable getAttachment()
- Returns:
Attachment Drawable of the notification.
-
setAttachment
NotificationData setAttachment(@Nullable() Drawable attachment)
Sets the attachment.
- Parameters:
attachment- Attachment Drawable.- Returns:
NotificationData for chaining.
-
getStickers
List<Sticker> getStickers()
- Returns:
Stickers of the notification.
-
setStickers
NotificationData setStickers(@Nullable() List<Sticker> stickers)
Sets the stickers.
- Parameters:
stickers- List of stickers.- Returns:
NotificationData for chaining.
-
getIconUrl
String getIconUrl()
- Returns:
Icon URL of the notification.
-
setIconUrl
NotificationData setIconUrl(@NonNull() String iconUrl)
Sets the icon URL.
- Parameters:
iconUrl- URL of the icon.- Returns:
NotificationData for chaining.
-
getIconResId
Integer getIconResId()
- Returns:
Title of the notification
-
setIconResId
NotificationData setIconResId(@Nullable() Integer iconResId)
Sets the icon.
- Parameters:
iconResId- IdRes of the icon Drawable.- Returns:
NotificationData for chaining.
-
getIconTopRight
Drawable getIconTopRight()
- Returns:
Drawable of the icon in the top right corner of the notification.
-
setIconTopRight
NotificationData setIconTopRight(@Nullable() Drawable iconTopRight)
Sets the icon on the top right corner of the notification.
- Parameters:
iconTopRight- Drawable of the icon.- Returns:
NotificationData for chaining.
-
getAutoDismissPeriodSecs
Integer getAutoDismissPeriodSecs()
- Returns:
Auto dismiss period time in seconds
-
setAutoDismissPeriodSecs
NotificationData setAutoDismissPeriodSecs(@Nullable() Integer autoDismissPeriodSecs)
Sets the auto dismiss period.
- Parameters:
autoDismissPeriodSecs- Dismiss period in seconds.- Returns:
NotificationData for chaining.
-
getValidScreens
List<out c<out AppComponent>> getValidScreens()
- Returns:
Valid screens
-
setValidScreens
NotificationData setValidScreens(@Nullable() List<out c<out AppComponent>> validScreens)
Sets valid screens for the notification.
- Parameters:
validScreens- Valid screens.- Returns:
NotificationData for chaining.
-
getOnClickTopRightIcon
Function1<in View, Unit> getOnClickTopRightIcon()
- Returns:
Block corresponding the onClick action of the icon in the top right corner of the notification.
-
setOnClickTopRightIcon
NotificationData setOnClickTopRightIcon(@Nullable() Function1<in View, Unit> onClickTopRightIcon)
Sets the callback for the notification top right corner icon onClick action.
- Parameters:
onClickTopRightIcon- Block to execute after clicking the icon in the top right corner of the notification.- Returns:
NotificationData for chaining.
-
getOnClick
Function1<in View, Unit> getOnClick()
- Returns:
Block corresponding the onClick action of the notification.
-
setOnClick
NotificationData setOnClick(@Nullable() Function1<in View, Unit> onClick)
Sets the callback for the notification onClick action.
- Parameters:
onClick- Block to execute after clicking the notification.- Returns:
NotificationData for chaining.
-
-
-
-