Notification



Notification, that can be sent to the platform and be shown to the user (in tray, notification center, etc; depends on the platform).

If notification creates inside Composable function it is better to use rememberNotification to avoid creating a new object every recomposition.

Summary

Nested types

Describes the type of the notification.

Public constructors

Notification(title: String, message: String, type: Notification.Type)
android

Public functions

Notification
copy(title: String, message: String, type: Notification.Type)

Returns a copy of this Notification instance optionally overriding the title, message, type parameter.

android
open operator Boolean
equals(other: Any?)
android
open Int
android
open String
android

Public properties

String

The main text of the notification

android
String

Title of the notification

android
Notification.Type

Type of the notification that defines how the notification will be represented to the user (with which icon and which sound)

android

Public constructors

Notification

Notification(
    title: String,
    message: String,
    type: Notification.Type = Type.None
)
Parameters
title: String

Title of the notification

message: String

The main text of the notification

type: Notification.Type = Type.None

Type of the notification that defines how the notification will be represented to the user (with which icon and which sound)

Public functions

copy

fun copy(
    title: String = this.title,
    message: String = this.message,
    type: Notification.Type = this.type
): Notification

Returns a copy of this Notification instance optionally overriding the title, message, type parameter.

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

message

val messageString

The main text of the notification

title

val titleString

Title of the notification

type

val typeNotification.Type

Type of the notification that defines how the notification will be represented to the user (with which icon and which sound)