Google is committed to advancing racial equity for Black communities. See how.

Builder

open class Builder
kotlin.Any
   ↳ androidx.core.app.NotificationChannelGroupCompat.Builder

Builder class for NotificationChannelGroupCompat objects.

Summary

Public constructors
<init>(@NonNull id: String)

Creates a notification channel group.

Public methods
open NotificationChannelGroupCompat

Creates a NotificationChannelGroupCompat instance.

open NotificationChannelGroupCompat.Builder
setDescription(@Nullable description: String?)

Sets the user visible description of this group.

open NotificationChannelGroupCompat.Builder
setName(@Nullable name: CharSequence?)

Sets the user visible name of this group.

Public constructors

<init>

Builder(@NonNull id: String)

Creates a notification channel group.

Parameters
id String: The id of the group. Must be unique per package. The value may be truncated if it is too long.

Public methods

build

@NonNull open fun build(): NotificationChannelGroupCompat

Creates a NotificationChannelGroupCompat instance.

setDescription

@NonNull open fun setDescription(@Nullable description: String?): NotificationChannelGroupCompat.Builder

Sets the user visible description of this group.

The recommended maximum length is 300 characters; the value may be truncated if it is too long.

setName

@NonNull open fun setName(@Nullable name: CharSequence?): NotificationChannelGroupCompat.Builder

Sets the user visible name of this group. You can rename this group when the system locale changes by listening for the Intent#ACTION_LOCALE_CHANGED broadcast.

The recommended maximum length is 40 characters; the value may be truncated if it is too long.