Google은 흑인 공동체를 위한 인종 간 평등을 진전시키기 위해 노력하고 있습니다. Google에서 어떤 노력을 하고 있는지 확인하세요.

MediaSessionService.MediaNotification

public static class MediaSessionService.MediaNotification
extends Object

java.lang.Object
   ↳ androidx.media2.session.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

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

MediaNotification

public 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