MediaNotificationActions

Class for customizing media notification actions and handling custom commands for Android 13+. This allows SDK customers to control what actions are shown in the media notification and how custom commands are handled.

Constructors

Link copied to clipboard
constructor(customActionsProvider: MediaNotificationActions.CustomActionsProvider? = null, customCommandHandler: MediaNotificationActions.CustomCommandHandler? = null)

Types

Link copied to clipboard
fun interface CustomActionsProvider

Interface for customizing the media session connection result. This allows customers to specify which actions/commands should be available in the media notification.

Link copied to clipboard
fun interface CustomCommandHandler

Interface for handling custom commands sent from the media notification.

Functions

Link copied to clipboard

Checks if custom actions provider is set.

Link copied to clipboard

Checks if custom command handler is set.

Link copied to clipboard
fun onHandleCustomCommand(mediaSession: <Error class: unknown class>?, controllerInfo: <Error class: unknown class>?, customCommand: <Error class: unknown class>?, args: <Error class: unknown class>? = null): Int

Handles a custom command from the media notification. This method is called internally by the SDK.

Link copied to clipboard
fun setupCustomActions(mediaSession: <Error class: unknown class>): <Error class: unknown class>?

Sets up custom actions for the media session. This method is called internally by the SDK.