PlayerNotificationManager.Builder
class PlayerNotificationManager.Builder
A builder for PlayerNotificationManager instances.
Summary
Public constructors |
|---|
|
Creates an instance. |
This function is deprecated. Use |
Public constructors
Builder
Builder(
context: Context!,
notificationId: @IntRange(from = 1) Int,
channelId: String!
)
Creates an instance.
| Parameters | |
|---|---|
context: Context! |
The |
notificationId: @IntRange(from = 1) Int |
The id of the notification to be posted. Must be greater than 0. |
channelId: String! |
The id of the notification channel of an existing notification channel or of the channel that should be automatically created. In the latter case, |
Builder
Builder(
context: Context!,
notificationId: Int,
channelId: String!,
mediaDescriptionAdapter: PlayerNotificationManager.MediaDescriptionAdapter!
)
Public functions
setChannelDescriptionResourceId
fun setChannelDescriptionResourceId(channelDescriptionResourceId: Int): PlayerNotificationManager.Builder!
The description of the channel. Ignored if setChannelNameResourceId is not called with a value other than 0. If the application has already created the notification channel, then this method should not be called.
The default is 0.
| Returns | |
|---|---|
PlayerNotificationManager.Builder! |
This builder. |
setChannelImportance
fun setChannelImportance(@NotificationUtil.Importance channelImportance: Int): PlayerNotificationManager.Builder!
The importance of the channel. Ignored if setChannelNameResourceId is not called with a value other than 0. If the application has already created the notification channel, then this method should not be called.
The default is IMPORTANCE_LOW.
| Returns | |
|---|---|
PlayerNotificationManager.Builder! |
This builder. |
setChannelNameResourceId
fun setChannelNameResourceId(channelNameResourceId: Int): PlayerNotificationManager.Builder!
The name of the channel. If set to a value other than 0, the channel is automatically created when build is called. If the application has already created the notification channel, then this method should not be called.
The default is 0.
| Returns | |
|---|---|
PlayerNotificationManager.Builder! |
This builder. |
setCustomActionReceiver
fun setCustomActionReceiver(
customActionReceiver: PlayerNotificationManager.CustomActionReceiver!
): PlayerNotificationManager.Builder!
The CustomActionReceiver to be used.
The default is null.
| Returns | |
|---|---|
PlayerNotificationManager.Builder! |
This builder. |
setFastForwardActionIconResourceId
fun setFastForwardActionIconResourceId(
fastForwardActionIconResourceId: Int
): PlayerNotificationManager.Builder!
The resource id of the drawable to be used as the icon of action ACTION_FAST_FORWARD.
The default is R.drawable#exo_notification_fastforward.
| Returns | |
|---|---|
PlayerNotificationManager.Builder! |
This builder. |
setGroup
fun setGroup(groupKey: String!): PlayerNotificationManager.Builder!
The key of the group the media notification should belong to.
The default is null
| Returns | |
|---|---|
PlayerNotificationManager.Builder! |
This builder. |
setMediaDescriptionAdapter
fun setMediaDescriptionAdapter(
mediaDescriptionAdapter: PlayerNotificationManager.MediaDescriptionAdapter!
): PlayerNotificationManager.Builder!
The MediaDescriptionAdapter to be queried for the notification contents.
The default is DefaultMediaDescriptionAdapter with no PendingIntent
| Returns | |
|---|---|
PlayerNotificationManager.Builder! |
This builder. |
setNextActionIconResourceId
fun setNextActionIconResourceId(nextActionIconResourceId: Int): PlayerNotificationManager.Builder!
The resource id of the drawable to be used as the icon of action ACTION_NEXT.
The default is R.drawable#exo_notification_next.
| Returns | |
|---|---|
PlayerNotificationManager.Builder! |
This builder. |
setNotificationListener
fun setNotificationListener(
notificationListener: PlayerNotificationManager.NotificationListener!
): PlayerNotificationManager.Builder!
The NotificationListener to be used.
The default is null.
| Returns | |
|---|---|
PlayerNotificationManager.Builder! |
This builder. |
setPauseActionIconResourceId
fun setPauseActionIconResourceId(pauseActionIconResourceId: Int): PlayerNotificationManager.Builder!
The resource id of the drawable to be used as the icon of action ACTION_PAUSE.
The default is R.drawable#exo_notification_pause.
| Returns | |
|---|---|
PlayerNotificationManager.Builder! |
This builder. |
setPlayActionIconResourceId
fun setPlayActionIconResourceId(playActionIconResourceId: Int): PlayerNotificationManager.Builder!
The resource id of the drawable to be used as the icon of action ACTION_PLAY.
The default is R.drawable#exo_notification_play.
| Returns | |
|---|---|
PlayerNotificationManager.Builder! |
This builder. |
setPreviousActionIconResourceId
fun setPreviousActionIconResourceId(previousActionIconResourceId: Int): PlayerNotificationManager.Builder!
The resource id of the drawable to be used as the icon of action ACTION_PREVIOUS.
The default is R.drawable#exo_notification_previous.
| Returns | |
|---|---|
PlayerNotificationManager.Builder! |
This builder. |
setRewindActionIconResourceId
fun setRewindActionIconResourceId(rewindActionIconResourceId: Int): PlayerNotificationManager.Builder!
The resource id of the drawable to be used as the icon of action ACTION_REWIND.
The default is R.drawable#exo_notification_rewind.
| Returns | |
|---|---|
PlayerNotificationManager.Builder! |
This builder. |
setSmallIconResourceId
fun setSmallIconResourceId(smallIconResourceId: Int): PlayerNotificationManager.Builder!
The resource id of the small icon of the notification shown in the status bar. See setSmallIcon.
The default is R.drawable#exo_notification_small_icon.
| Returns | |
|---|---|
PlayerNotificationManager.Builder! |
This builder. |
setStopActionIconResourceId
fun setStopActionIconResourceId(stopActionIconResourceId: Int): PlayerNotificationManager.Builder!
The resource id of the drawable to be used as the icon of action ACTION_STOP.
The default is R.drawable#exo_notification_stop.
| Returns | |
|---|---|
PlayerNotificationManager.Builder! |
This builder. |
Protected properties
customActionReceiver
protected val customActionReceiver: PlayerNotificationManager.CustomActionReceiver?
mediaDescriptionAdapter
protected val mediaDescriptionAdapter: PlayerNotificationManager.MediaDescriptionAdapter!
notificationListener
protected val notificationListener: PlayerNotificationManager.NotificationListener?