Added in API level 19

CaptioningManager

open class CaptioningManager
kotlin.Any
   ↳ android.view.accessibility.CaptioningManager

Contains methods for accessing and monitoring preferred video captioning state and visual properties.

Summary

Nested classes

Specifies visual properties for video captions, including foreground and background colors, edge properties, and typeface.

abstract

Listener for changes in captioning properties, including enabled state and user style preferences.

Public methods
open Unit

Adds a listener for changes in the user's preferred captioning enabled state and visual properties.

Float

Locale?

open CaptioningManager.CaptionStyle

open Boolean

Returns true if system wide call captioning is enabled for this device.

Boolean

Boolean

Boolean

open Unit

Removes a listener previously added using addCaptioningChangeListener.

Public methods

addCaptioningChangeListener

Added in API level 19
open fun addCaptioningChangeListener(listener: CaptioningManager.CaptioningChangeListener): Unit

Adds a listener for changes in the user's preferred captioning enabled state and visual properties.

Parameters
listener CaptioningManager.CaptioningChangeListener: the listener to add This value cannot be null.

getFontScale

Added in API level 19
fun getFontScale(): Float
Return
Float the user's preferred font scaling factor for video captions, or 1 if not specified

getLocale

Added in API level 19
fun getLocale(): Locale?
Return
Locale? the locale for the user's preferred captioning language, or null if not specified

getUserStyle

Added in API level 19
open fun getUserStyle(): CaptioningManager.CaptionStyle
Return
CaptioningManager.CaptionStyle the user's preferred visual properties for captions as a CaptionStyle, or the default style if not specified This value cannot be null.

isCallCaptioningEnabled

Added in API level 33
open fun isCallCaptioningEnabled(): Boolean

Returns true if system wide call captioning is enabled for this device.

isEnabled

Added in API level 19
fun isEnabled(): Boolean
Return
Boolean the user's preferred captioning enabled state

isSystemAudioCaptioningEnabled

Added in API level 33
fun isSystemAudioCaptioningEnabled(): Boolean
Return
Boolean the system audio caption enabled state.

isSystemAudioCaptioningUiEnabled

Added in API level 33
fun isSystemAudioCaptioningUiEnabled(): Boolean
Return
Boolean the system audio caption UI enabled state.

removeCaptioningChangeListener

Added in API level 19
open fun removeCaptioningChangeListener(listener: CaptioningManager.CaptioningChangeListener): Unit

Removes a listener previously added using addCaptioningChangeListener.

Parameters
listener CaptioningManager.CaptioningChangeListener: the listener to remove This value cannot be null.