NotificationChannelCompat

Compatibility class for supporting NotificationChannel functionality across Android OS versions.

Constructors

Link copied to clipboard
@RequiresApi(api = 26)
constructor(notificationChannel: NotificationChannel)

NotificationChannelCompat constructor.

constructor(id: String, name: CharSequence, importance: Int)

NotificationChannelCompat constructor.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Indicates whether the channel can bypass do-not-disturb.

Link copied to clipboard

The channel's description.

Link copied to clipboard

The channel's group.

Link copied to clipboard
val id: String

The channel's identifier.

Link copied to clipboard

The channel's importance.

Link copied to clipboard

The channel's light color.

Link copied to clipboard

The channel's lockscreen visibility.

Link copied to clipboard

The channel's name.

Link copied to clipboard

Indicates whether the channel can show badges

Link copied to clipboard

The channel's sound.

Link copied to clipboard

The channel's vibration pattern.

Functions

Link copied to clipboard
fun enableLights(lights: Boolean)

Sets whether the channel can show lights.

Link copied to clipboard
fun enableVibration(vibration: Boolean)

Sets whether the channel can vibrate.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

Indicates whether the channel can show lights.

Link copied to clipboard

Indicates whether the channel can vibrate.

Link copied to clipboard
open override fun toJsonValue(): JsonValue

Returns the objects represented as a JsonValue.

Link copied to clipboard

Creates a corresponding NotificationChannel object for Android O and above.

Link copied to clipboard
open override fun toString(): String