PlayerNotificationManager
open class PlayerNotificationManager---
Deprecated
Use the media session integration instead.
See also
| com.bitmovin.player.api.media.session.MediaSession |
Constructors
| PlayerNotificationManager | constructor(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
Properties
| Name | Summary |
|---|---|
| ACTION_FAST_FORWARD | val ACTION_FAST_FORWARD: String = "com.bitmovin.player.ffwd" The action which fast forwards. |
| ACTION_PAUSE | val ACTION_PAUSE: String = "com.bitmovin.player.pause" The action which pauses playback. |
| ACTION_PLAY | val ACTION_PLAY: String = "com.bitmovin.player.play" The action which starts playback. |
| ACTION_REPLAY | val ACTION_REPLAY: String = "com.bitmovin.player.replay" The action which replays playback. |
| ACTION_REWIND | val ACTION_REWIND: String = "com.bitmovin.player.rewind" The action which rewinds. |
| ACTION_STOP | val ACTION_STOP: String = "com.bitmovin.player.stop" The action which cancels the notification and stops playback. |
| DEFAULT_FAST_FORWARD_MS | val DEFAULT_FAST_FORWARD_MS: Int = 15000 The default fast forward increment, in milliseconds. |
| DEFAULT_REWIND_MS | val DEFAULT_REWIND_MS: Int = 5000 The default rewind increment, in milliseconds. |
Functions
| Name | Summary |
|---|---|
| createWithNotificationChannel | open 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. |
| setBadgeIconType | fun setBadgeIconType(badgeIconType: Int) Sets the badge icon type of the notification. |
| setColor | fun setColor(color: Int) Sets the accent color of the notification. |
| setColorized | fun setColorized(colorized: Boolean) Sets whether the notification should be colorized. |
| setDefaults | fun setDefaults(defaults: Int) Sets the defaults. |
| setFastForwardIncrementMs | fun setFastForwardIncrementMs(fastForwardMs: Long) Sets the fast forward increment in milliseconds. |
| setMediaSessionToken | fun setMediaSessionToken(token: MediaSessionCompat.Token) Sets the MediaSessionCompat.Token. |
| setNotificationListener | fun setNotificationListener(@NullablenotificationListener: NotificationListener) Sets the NotificationListener. |
| setOngoing | fun setOngoing(ongoing: Boolean) Sets whether the notification should be ongoing. |
| setPlayer | fun setPlayer(@Nullableplayer: Player) Sets the Player. |
| setPriority | fun setPriority(priority: Int) Sets the priority of the notification required for API 25 and lower. |
| setRewindIncrementMs | fun setRewindIncrementMs(rewindMs: Long) Sets the rewind increment in milliseconds. |
| setSmallIcon | fun setSmallIcon(@DrawableRessmallIconResourceId: Int) Sets the small icon of the notification which is also shown in the system status bar. |
| setStopAction | fun setStopAction(@NullablestopAction: String) Sets the name of the action to be used as stop action to cancel the notification. |
| setUseChronometer | fun setUseChronometer(useChronometer: Boolean) Sets whether the elapsed time of the media playback should be displayed See setUsesChronometer. |
| setUsePlayPauseActions | fun setUsePlayPauseActions(usePlayPauseActions: Boolean) Sets whether the play and pause actions should be used. |
| setVisibility | 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. |