PlayerNotificationManager

PlayerNotificationManager

open class PlayerNotificationManager---

Deprecated

Use the media session integration instead.


See also

com.bitmovin.player.api.media.session.MediaSession

Constructors

PlayerNotificationManagerconstructor(context: Context, channelId: String, notificationId: Int, @NullablemediaDescriptionAdapter: MediaDescriptionAdapter)
Creates a notification manager using the specified notification channelId.
constructor(context: Context, channelId: String, notificationId: Int, @NullablemediaDescriptionAdapter: MediaDescriptionAdapter, @NullablecustomActionReceiver: CustomActionReceiver)
Creates a notification manager using the specified notification channelId and CustomActionReceiver.

Types

NameSummary
BitmapCallbackinner class BitmapCallback
Receives a Bitmap.
Priority@Retention(value = SOURCE)
annotation class Priority
Priority of the notification (required for API 25 and lower).
Visibility@Retention(value = SOURCE)
annotation class Visibility
Visibility of notification on the lock screen.

Properties

NameSummary
ACTION_FAST_FORWARDval ACTION_FAST_FORWARD: String = "com.bitmovin.player.ffwd"
The action which fast forwards.
ACTION_PAUSEval ACTION_PAUSE: String = "com.bitmovin.player.pause"
The action which pauses playback.
ACTION_PLAYval ACTION_PLAY: String = "com.bitmovin.player.play"
The action which starts playback.
ACTION_REPLAYval ACTION_REPLAY: String = "com.bitmovin.player.replay"
The action which replays playback.
ACTION_REWINDval ACTION_REWIND: String = "com.bitmovin.player.rewind"
The action which rewinds.
ACTION_STOPval ACTION_STOP: String = "com.bitmovin.player.stop"
The action which cancels the notification and stops playback.
DEFAULT_FAST_FORWARD_MSval DEFAULT_FAST_FORWARD_MS: Int = 15000
The default fast forward increment, in milliseconds.
DEFAULT_REWIND_MSval DEFAULT_REWIND_MS: Int = 5000
The default rewind increment, in milliseconds.

Functions

NameSummary
createWithNotificationChannelopen fun createWithNotificationChannel(context: Context, channelId: String, @StringReschannelName: Int, notificationId: Int, mediaDescriptionAdapter: MediaDescriptionAdapter): PlayerNotificationManager
Creates a notification manager and a low-priority notification channel with the specified channelId and channelName.
open fun createWithNotificationChannel(context: Context, channelId: String, @StringReschannelName: Int, @StringReschannelDescription: Int, notificationId: Int, mediaDescriptionAdapter: MediaDescriptionAdapter): PlayerNotificationManager
open fun createWithNotificationChannel(context: Context, channelId: String, @StringReschannelName: Int, @StringReschannelDescription: 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.
setBadgeIconTypefun setBadgeIconType(badgeIconType: Int)
Sets the badge icon type of the notification.
setColorfun setColor(color: Int)
Sets the accent color of the notification.
setColorizedfun setColorized(colorized: Boolean)
Sets whether the notification should be colorized.
setDefaultsfun setDefaults(defaults: Int)
Sets the defaults.
setFastForwardIncrementMsfun setFastForwardIncrementMs(fastForwardMs: Long)
Sets the fast forward increment in milliseconds.
setMediaSessionTokenfun setMediaSessionToken(token: MediaSessionCompat.Token)
Sets the MediaSessionCompat.Token.
setNotificationListenerfun setNotificationListener(@NullablenotificationListener: NotificationListener)
Sets the NotificationListener.
setOngoingfun setOngoing(ongoing: Boolean)
Sets whether the notification should be ongoing.
setPlayerfun setPlayer(@Nullableplayer: Player)
Sets the Player.
setPriorityfun setPriority(priority: Int)
Sets the priority of the notification required for API 25 and lower.
setRewindIncrementMsfun setRewindIncrementMs(rewindMs: Long)
Sets the rewind increment in milliseconds.
setSmallIconfun setSmallIcon(@DrawableRessmallIconResourceId: Int)
Sets the small icon of the notification which is also shown in the system status bar.
setStopActionfun setStopAction(@NullablestopAction: String)
Sets the name of the action to be used as stop action to cancel the notification.
setUseChronometerfun setUseChronometer(useChronometer: Boolean)
Sets whether the elapsed time of the media playback should be displayed See setUsesChronometer.
setUsePlayPauseActionsfun setUsePlayPauseActions(usePlayPauseActions: Boolean)
Sets whether the play and pause actions should be used.
setVisibilityfun setVisibility(visibility: Int)
Sets the visibility of the notification which determines whether and how the notification is shown when the device is in lock screen mode.