createWithNotificationChannel

open fun createWithNotificationChannel(context: Context, channelId: String, @StringRes channelName: Int, notificationId: Int, mediaDescriptionAdapter: MediaDescriptionAdapter): PlayerNotificationManager

Creates a notification manager and a low-priority notification channel with the specified channelId and channelName.

Parameters

context

The Context.

channelId

The id of the notification channel.

channelName

A string resource identifier for the user visible name of the channel. The recommended maximum length is 40 characters; the value may be truncated if it is too long.

notificationId

The id of the notification.

mediaDescriptionAdapter

open fun createWithNotificationChannel(context: Context, channelId: String, @StringRes channelName: Int, @StringRes channelDescription: Int, notificationId: Int, mediaDescriptionAdapter: MediaDescriptionAdapter): PlayerNotificationManager

Creates a notification manager and a low-priority notification channel with the specified channelId, channelName and channelDescription.

Parameters

context

The Context.

channelId

The id of the notification channel.

channelName

A string resource identifier for the user visible name of the channel. The recommended maximum length is 40 characters; the value may be truncated if it is too long.

channelDescription

A string resource identifier for the user visible description of the channel, or 0 if no description is provided. The recommended maximum length is 300 characters. The value may be truncated if it is too long.

notificationId

The id of the notification.

mediaDescriptionAdapter

open fun createWithNotificationChannel(context: Context, channelId: String, @StringRes channelName: Int, @StringRes channelDescription: Int, notificationId: Int, mediaDescriptionAdapter: MediaDescriptionAdapter, customActionReceiver: CustomActionReceiver): PlayerNotificationManager

Creates a notification manager and a low-priority notification channel with the specified channelId, channelName and channelDescription.

Parameters

context

The Context.

channelId

The id of the notification channel.

channelName

A string resource identifier for the user visible name of the channel. The recommended maximum length is 40 characters; the value may be truncated if it is too long.

channelDescription

A string resource identifier for the user visible description of the channel, or 0 if no description is provided. The recommended maximum length is 300 characters. The value may be truncated if it is too long.

notificationId

The id of the notification.

mediaDescriptionAdapter
customActionReceiver