MediaNotification
class MediaNotification
A notification for media playbacks.
Summary
Nested types |
|---|
@UnstableApiCreates |
@UnstableApiProvides |
interface MediaNotification.Provider.CallbackReceives updates for a notification. |
Constants |
|
|---|---|
const String! |
@UnstableApiEvent key to indicate a media notification was dismissed. |
Public constructors |
|---|
MediaNotification(Creates an instance. |
Public properties |
|
|---|---|
Notification! |
The |
@IntRange(from = 1) Int |
The notification id. |
Constants
NOTIFICATION_DISMISSED_EVENT_KEY
@UnstableApi
const val NOTIFICATION_DISMISSED_EVENT_KEY = "androidx.media3.session.NOTIFICATION_DISMISSED_EVENT_KEY": String!
Event key to indicate a media notification was dismissed.
This event key can be used as an extras key for a boolean extra on a media button pending intent, and as as custom session command action to inform the media notification controller that a notification was dismissed.
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 |
notification: Notification! |
A |