Google 致力于为黑人社区推动种族平等。查看具体举措

NotificationChannelGroupCompat

public class NotificationChannelGroupCompat
extends Object

java.lang.Object
   ↳ androidx.core.app.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 classes

class NotificationChannelGroupCompat.Builder

Builder class for NotificationChannelGroupCompat objects. 

Public methods

List<NotificationChannelCompat> getChannels()

Returns the list of channels that belong to this group.

String getDescription()

Gets the user visible description of the group.

String getId()

Gets the id of the group.

CharSequence getName()

Gets the user visible name of the group.

boolean isBlocked()

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

NotificationChannelGroupCompat.Builder toBuilder()

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

Inherited methods

Public methods

getChannels

public List<NotificationChannelCompat> getChannels ()

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.

Returns
List<NotificationChannelCompat>

getDescription

public String getDescription ()

Gets the user visible description of the group.

Returns
String

getId

public String getId ()

Gets the id of the group.

Returns
String

getName

public CharSequence getName ()

Gets the user visible name of the group.

Returns
CharSequence

isBlocked

public boolean isBlocked ()

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

This value is always false before Build.VERSION_CODES.P

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

Returns
boolean

toBuilder

public NotificationChannelGroupCompat.Builder toBuilder ()

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

Returns
NotificationChannelGroupCompat.Builder