MediaNotification


class MediaNotification


A notification for media playbacks.

Summary

Nested types

Creates actions and pending intents for notifications.

Provides media notifications to be posted as notifications that reflect the state of a MediaController and to send media commands to a .

Receives updates for a notification.

Public constructors

MediaNotification(
    notificationId: @IntRange(from = 1) Int,
    notification: Notification!
)

Creates an instance.

Public properties

Notification!

The Notification.

@IntRange(from = 1) Int

The notification id.

Public constructors

MediaNotification

MediaNotification(
    notificationId: @IntRange(from = 1) Int,
    notification: Notification!
)

Creates an instance.

Parameters
notificationId: @IntRange(from = 1) Int

The notification id to be used for notify.

notification: Notification!

A Notification that reflects the state of a MediaController and to send media commands to a MediaSession. The notification may be used to start a service in the foreground. It's highly recommended to use a media style notification.

Public properties

notification

val notificationNotification!

The Notification.

notificationId

val notificationId: @IntRange(from = 1) Int

The notification id.