Builder


class Builder
kotlin.Any
   ↳ android.app.personalcontext.hint.NotificationDetails.Builder

Builder for NotificationDetails.

Summary

Public constructors

Public methods
NotificationDetails

Builds the NotificationDetails.

NotificationDetails.Builder
setKey(key: String)

Sets the unique status bar key of the notification.

NotificationDetails.Builder

Sets the underlying Notification.

NotificationDetails.Builder
setPackageName(packageName: String)

Sets the package name of the app that posted the notification.

NotificationDetails.Builder
setPostTimeMillis(postTimeMillis: Long)

Sets the post timestamp of the notification in milliseconds since epoch.

NotificationDetails.Builder

Sets the user associated with this notification.

Public constructors

Builder

Builder()

Public methods

build

fun build(): NotificationDetails

Builds the NotificationDetails.

Return
NotificationDetails This value cannot be null.

setKey

fun setKey(key: String): NotificationDetails.Builder

Sets the unique status bar key of the notification.

Parameters
key String: This value cannot be null.
Return
NotificationDetails.Builder This value cannot be null.

setNotification

fun setNotification(notification: Notification): NotificationDetails.Builder

Sets the underlying Notification.

Parameters
notification Notification: This value cannot be null.
Return
NotificationDetails.Builder This value cannot be null.

setPackageName

fun setPackageName(packageName: String): NotificationDetails.Builder

Sets the package name of the app that posted the notification.

Parameters
packageName String: This value cannot be null.
Return
NotificationDetails.Builder This value cannot be null.

setPostTimeMillis

fun setPostTimeMillis(postTimeMillis: Long): NotificationDetails.Builder

Sets the post timestamp of the notification in milliseconds since epoch.

Return
NotificationDetails.Builder This value cannot be null.

setUser

fun setUser(user: UserHandle): NotificationDetails.Builder

Sets the user associated with this notification.

Parameters
user UserHandle: This value cannot be null.
Return
NotificationDetails.Builder This value cannot be null.