NotificationChannelGroupCompat

Added in 1.5.0

public class NotificationChannelGroupCompat


A grouping of related notification channels. e.g., channels that all belong to a single account. Setters return this to allow chaining. This class doesn't do anything on older SDKs which don't support Notification Channels.

Summary

Nested types

Builder class for NotificationChannelGroupCompat objects.

Public methods

@NonNull List<NotificationChannelCompat>

Returns the list of channels that belong to this group.

@Nullable String

Gets the user visible description of the group.

@NonNull String

Gets the id of the group.

@Nullable CharSequence

Gets the user visible name of the group.

boolean

Returns whether or not notifications posted to NotificationChannelCompat belonging to this group are blocked.

@NonNull NotificationChannelGroupCompat.Builder

Creates a Builder instance with all the writeable property values of this instance.

Public methods

getChannels

Added in 1.5.0
public @NonNull List<NotificationChannelCompatgetChannels()

Returns the list of channels that belong to this group.

This is a read-only property which is only valid on instances fetched from the NotificationManagerCompat.

getDescription

Added in 1.5.0
public @Nullable String getDescription()

Gets the user visible description of the group.

getId

Added in 1.5.0
public @NonNull String getId()

Gets the id of the group.

getName

Added in 1.5.0
public @Nullable CharSequence getName()

Gets the user visible name of the group.

isBlocked

Added in 1.5.0
public boolean isBlocked()

Returns whether or not notifications posted to NotificationChannelCompat belonging to this group are blocked. This value is independent of areNotificationsEnabled and getImportance.

This value is always false before P

This is a read-only property which is only valid on instances fetched from the NotificationManagerCompat.

toBuilder

Added in 1.5.0
public @NonNull NotificationChannelGroupCompat.Builder toBuilder()

Creates a Builder instance with all the writeable property values of this instance.