NotificationChannelCompat.Builder

public static class NotificationChannelCompat.Builder
extends Object

java.lang.Object
   ↳ androidx.core.app.NotificationChannelCompat.Builder


Builder class for NotificationChannelCompat objects.

Summary

Public constructors

Builder(String id, int importance)

Creates a notification channel builder.

Public methods

NotificationChannelCompat build()

Creates a NotificationChannelCompat instance.

NotificationChannelCompat.Builder setConversationId(String parentChannelId, String conversationId)

Sets this channel as being conversation-centric.

NotificationChannelCompat.Builder setDescription(String description)

Sets the user visible description of this channel.

NotificationChannelCompat.Builder setGroup(String groupId)

Sets what group this channel belongs to.

NotificationChannelCompat.Builder setImportance(int importance)

Sets the level of interruption of this notification channel.

NotificationChannelCompat.Builder setLightColor(int argb)

Sets the notification light color for notifications posted to this channel, if lights are enabled on this channel and the device supports that feature.

NotificationChannelCompat.Builder setLightsEnabled(boolean lights)

Sets whether notifications posted to this channel should display notification lights, on devices that support that feature.

NotificationChannelCompat.Builder setName(CharSequence name)

Sets the user visible name of this channel.

NotificationChannelCompat.Builder setShowBadge(boolean showBadge)

Sets whether notifications posted to this channel can appear as application icon badges in a Launcher.

NotificationChannelCompat.Builder setSound(Uri sound, AudioAttributes audioAttributes)

Sets the sound that should be played for notifications posted to this channel and its audio attributes.

NotificationChannelCompat.Builder setVibrationEnabled(boolean vibration)

Sets whether notification posted to this channel should vibrate.