MediaSessionService.MediaNotification

Added in 1.0.0
Deprecated in 1.3.0

public class MediaSessionService.MediaNotification


Returned by onUpdateNotification 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, @NonNull Notification notification)

Default constructor

Public methods

@NonNull Notification

Gets the notification.

int

Gets the id of the id.

Public constructors

MediaNotification

Added in 1.0.0
Deprecated in 1.3.0
public MediaNotification(int notificationId, @NonNull Notification notification)

Default constructor

Parameters
int notificationId

notification id to be used for notify.

@NonNull Notification notification

a notification to make session service foreground service. Media style notification is recommended here.

Public methods

getNotification

Added in 1.0.0
Deprecated in 1.3.0
public @NonNull Notification getNotification()

Gets the notification.

Returns
@NonNull Notification

the notification

getNotificationId

Added in 1.0.0
Deprecated in 1.3.0
public int getNotificationId()

Gets the id of the id.

Returns
int

the notification id