MediaNotification
public final class MediaNotification
A notification for media playbacks.
Summary
Nested types |
|---|
@UnstableApiCreates |
@UnstableApiProvides |
public interface MediaNotification.Provider.CallbackReceives updates for a notification. |
Constants |
|
|---|---|
static final String |
@UnstableApiEvent key to indicate a media notification was dismissed. |
Public fields |
|
|---|---|
final Notification |
The |
final @IntRange(from = 1) int |
The notification id. |
Public constructors |
|---|
MediaNotification(Creates an instance. |
Constants
NOTIFICATION_DISMISSED_EVENT_KEY
@UnstableApi
public static final String NOTIFICATION_DISMISSED_EVENT_KEY = "androidx.media3.session.NOTIFICATION_DISMISSED_EVENT_KEY"
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 fields
Public constructors
MediaNotification
public MediaNotification(
@IntRange(from = 1) int notificationId,
Notification notification
)
Creates an instance.
| Parameters | |
|---|---|
@IntRange(from = 1) int notificationId |
The notification id to be used for |
Notification notification |
A |