Builder
A builder used to create a StockNotificationPanel. The created panel is configured by the properties of this builder.
Properties
The creation time of the notification panel. This is similar to Android's Notification.Builder.setWhen. If null
, the creation time of the notification panel is set to the current time.
The FrontendContext for a notification panel to communicate with the rest of the system.
The view model for the header section containing the thumbnail, title and description.
Whether the notification panel is dismissible by the user.
A callback to be invoked when the panel is attached.
A callback to be invoked when the notification panel is suppressed. The notification panel may be suppressed to avoid distractions. This call back may be called multiple times.
The view models for options in the options section. Each view model populates an additional item in the options section. Each item represents one option a user can choose from(e.g. send quick replies, an option given by VPA, etc.).
The view model for the primary button in the button section.
The NotificationPanel.Priority of a notification panel.
The view model for the secondary action button in the button section.
If true
, the notification is shown as heads-up notification. If false
, the notification is not shown as heads-up notification. In this case showInNotificationCenter must be true
. The default value is true
.
If true
, the notification is shown in the notification center. If false
, the notification is not shown in the notification center. In this case showAsHeadsUpNotification must be true
. The default value is true
.
Functions
Set optionViewModels to the given viewModels.
Set primaryActionButtonViewModel to the given viewModel.
Set secondaryActionButtonViewModel to the given viewModel.