MediaSessionService.MediaNotification
public
static
class
MediaSessionService.MediaNotification
extends Object
| java.lang.Object | |
| ↳ | androidx.media2.MediaSessionService.MediaNotification |
Returned by MediaSessionService.onUpdateNotification(MediaSession) for making session service
foreground service to keep playback running in the background. It's highly recommended to
show media style notification here.
Summary
Public constructors | |
|---|---|
MediaSessionService.MediaNotification(int notificationId, Notification notification)
Default constructor |
|
Public methods | |
|---|---|
Notification
|
getNotification()
Gets the notification. |
int
|
getNotificationId()
Gets the id of the id. |
Inherited methods | |
|---|---|
Public constructors
MediaSessionService.MediaNotification
public MediaSessionService.MediaNotification (int notificationId,
Notification notification)
Default constructor
| Parameters | |
|---|---|
notificationId |
int: notification id to be used for
NotificationManager.notify(int, Notification). |
notification |
Notification: a notification to make session service foreground service. Media
style notification is recommended here.
|
Public methods
getNotification
public Notification getNotification ()
Gets the notification.
| Returns | |
|---|---|
Notification |
the notification |
getNotificationId
public int getNotificationId ()
Gets the id of the id.
| Returns | |
|---|---|
int |
the notification id |
Interfaces
Classes
- CallbackMediaItem
- CallbackMediaItem.Builder
- DataSourceCallback
- FileMediaItem
- FileMediaItem.Builder
- HeartRating
- MediaBrowser
- MediaBrowser.BrowserCallback
- MediaBrowser.BrowserResult
- MediaController
- MediaController.ControllerCallback
- MediaController.ControllerResult
- MediaController.PlaybackInfo
- MediaItem
- MediaItem.Builder
- MediaLibraryService
- MediaLibraryService.LibraryParams
- MediaLibraryService.LibraryParams.Builder
- MediaLibraryService.LibraryResult
- MediaLibraryService.MediaLibrarySession
- MediaLibraryService.MediaLibrarySession.Builder
- MediaLibraryService.MediaLibrarySession.MediaLibrarySessionCallback
- MediaMetadata
- MediaMetadata.Builder
- MediaPlayer
- MediaPlayer.PlayerCallback
- MediaPlayer.TrackInfo
- MediaSession
- MediaSession.Builder
- MediaSession.CommandButton
- MediaSession.CommandButton.Builder
- MediaSession.ControllerInfo
- MediaSession.SessionCallback
- MediaSession.SessionResult
- MediaSessionManager
- MediaSessionService
- MediaSessionService.MediaNotification
- MediaTimestamp
- PercentageRating
- PlaybackParams
- PlaybackParams.Builder
- SessionCommand
- SessionCommandGroup
- SessionCommandGroup.Builder
- SessionPlayer
- SessionPlayer.PlayerCallback
- SessionPlayer.PlayerResult
- SessionToken
- StarRating
- SubtitleData
- ThumbRating
- TimedMetaData
- UriMediaItem
- UriMediaItem.Builder
- VideoSize