NotificationChannelGroup
class NotificationChannelGroup : Parcelable
| kotlin.Any | |
| ↳ | android.app.NotificationChannelGroup | 
A grouping of related notification channels. e.g., channels that all belong to a single account.
Summary
| Inherited constants | |
|---|---|
| Public constructors | |
|---|---|
| NotificationChannelGroup(id: String!, name: CharSequence!)Creates a notification channel group. | |
| Public methods | |
|---|---|
| NotificationChannelGroup! | clone() | 
| Int | |
| Boolean | Indicates whether some other object is "equal to" this one. | 
| MutableList<NotificationChannel!>! | Returns the list of channels that belong to this group | 
| String! | Returns the user visible description of this group. | 
| String! | getId()Returns the id of this group. | 
| CharSequence! | getName()Returns the user visible name of this group. | 
| Int | hashCode() | 
| Boolean | Returns whether or not notifications posted to  | 
| Unit | setDescription(description: String!)Sets the user visible description of this group. | 
| String | toString() | 
| Unit | writeToParcel(dest: Parcel, flags: Int) | 
| Properties | |
|---|---|
| static Parcelable.Creator<NotificationChannelGroup!> | |
Public constructors
NotificationChannelGroup
NotificationChannelGroup(
id: String!,
name: CharSequence!)
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. | 
| name | CharSequence!: The user visible name of the group. You can rename this group when the system locale changes by listening for the Intent.ACTION_LOCALE_CHANGEDbroadcast.The recommended maximum length is 40 characters; the value may be truncated if it is too long. | 
Public methods
clone
fun clone(): NotificationChannelGroup!
| Return | |
|---|---|
| NotificationChannelGroup! | a clone of this instance. | 
| Exceptions | |
|---|---|
| java.lang.CloneNotSupportedException | if the object's class does not support the Cloneableinterface. Subclasses that override theclonemethod can also throw this exception to indicate that an instance cannot be cloned. | 
describeContents
fun describeContents(): Int
| Return | |
|---|---|
| Int | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0orandroid.os.Parcelable#CONTENTS_FILE_DESCRIPTOR | 
equals
fun equals(other: Any?): Boolean
Indicates whether some other object is "equal to" this one.
 The equals method implements an equivalence relation on non-null object references: 
- It is reflexive: for any non-null reference value x,x.equals(x)should returntrue.
- It is symmetric: for any non-null reference values xandy,x.equals(y)should returntrueif and only ify.equals(x)returnstrue.
- It is transitive: for any non-null reference values x,y, andz, ifx.equals(y)returnstrueandy.equals(z)returnstrue, thenx.equals(z)should returntrue.
- It is consistent: for any non-null reference values xandy, multiple invocations ofx.equals(y)consistently returntrueor consistently returnfalse, provided no information used inequalscomparisons on the objects is modified.
- For any non-null reference value x,x.equals(null)should returnfalse.
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| Parameters | |
|---|---|
| obj | the reference object with which to compare. | 
| o | This value may be null. | 
| Return | |
|---|---|
| Boolean | trueif this object is the same as the obj argument;falseotherwise. | 
getChannels
fun getChannels(): MutableList<NotificationChannel!>!
Returns the list of channels that belong to this group
getDescription
fun getDescription(): String!
Returns the user visible description of this group.
getName
fun getName(): CharSequence!
Returns the user visible name of this group.
isBlocked
fun isBlocked(): Boolean
Returns whether or not notifications posted to channels belonging to this group are blocked. This value is independent of NotificationManager.areNotificationsEnabled() and NotificationChannel.getImportance().
setDescription
fun setDescription(description: String!): Unit
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.
toString
fun toString(): String
| Return | |
|---|---|
| String | a string representation of the object. | 
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
| Parameters | |
|---|---|
| dest | Parcel: The Parcel in which the object should be written. This value cannot be null. | 
| flags | Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either0or a combination ofandroid.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES | 
