PlayerNotificationManager

Deprecated

Use the media session integration instead.

Deprecated

Use the media session integration instead.

See also

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

Constructors

Link copied to clipboard
constructor(context: Context, channelId: String, notificationId: Int, @Nullable mediaDescriptionAdapter: MediaDescriptionAdapter)
Creates a notification manager using the specified notification channelId.
constructor(context: Context, channelId: String, notificationId: Int, @Nullable mediaDescriptionAdapter: MediaDescriptionAdapter, @Nullable customActionReceiver: CustomActionReceiver)
Creates a notification manager using the specified notification channelId and .

Types

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

Properties

Link copied to clipboard
val ACTION_FAST_FORWARD: String = "com.bitmovin.player.ffwd"
The action which fast forwards.
Link copied to clipboard
val ACTION_PAUSE: String = "com.bitmovin.player.pause"
The action which pauses playback.
Link copied to clipboard
val ACTION_PLAY: String = "com.bitmovin.player.play"
The action which starts playback.
Link copied to clipboard
val ACTION_REPLAY: String = "com.bitmovin.player.replay"
The action which replays playback.
Link copied to clipboard
val ACTION_REWIND: String = "com.bitmovin.player.rewind"
The action which rewinds.
Link copied to clipboard
val ACTION_STOP: String = "com.bitmovin.player.stop"
The action which cancels the notification and stops playback.
Link copied to clipboard
The default fast forward increment, in milliseconds.
Link copied to clipboard
The default rewind increment, in milliseconds.

Functions

Link copied to clipboard
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.
open fun createWithNotificationChannel(context: Context, channelId: String, @StringRes channelName: Int, @StringRes channelDescription: Int, notificationId: Int, mediaDescriptionAdapter: MediaDescriptionAdapter): PlayerNotificationManager
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.
Link copied to clipboard
fun setBadgeIconType(badgeIconType: Int)
Sets the badge icon type of the notification.
Link copied to clipboard
fun setColor(color: Int)
Sets the accent color of the notification.
Link copied to clipboard
fun setColorized(colorized: Boolean)
Sets whether the notification should be colorized.
Link copied to clipboard
fun setDefaults(defaults: Int)
Sets the defaults.
Link copied to clipboard
fun setFastForwardIncrementMs(fastForwardMs: Long)
Sets the fast forward increment in milliseconds.
Link copied to clipboard
Link copied to clipboard
fun setOngoing(ongoing: Boolean)
Sets whether the notification should be ongoing.
Link copied to clipboard
fun setPlayer(@Nullable player: Player)
Sets the Player.
Link copied to clipboard
fun setPriority(priority: Int)
Sets the priority of the notification required for API 25 and lower.
Link copied to clipboard
fun setRewindIncrementMs(rewindMs: Long)
Sets the rewind increment in milliseconds.
Link copied to clipboard
fun setSmallIcon(@DrawableRes smallIconResourceId: Int)
Sets the small icon of the notification which is also shown in the system status bar.
Link copied to clipboard
fun setStopAction(@Nullable stopAction: String)
Sets the name of the action to be used as stop action to cancel the notification.
Link copied to clipboard
fun setUseChronometer(useChronometer: Boolean)
Sets whether the elapsed time of the media playback should be displayed See setUsesChronometer.
Link copied to clipboard
fun setUsePlayPauseActions(usePlayPauseActions: Boolean)
Sets whether the play and pause actions should be used.
Link copied to clipboard
fun 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.