Builder

class Builder

Build a new VoiceInstructionsPlayerOptions

Constructors

Link copied to clipboard
fun Builder()

Functions

Link copied to clipboard
fun build(): VoiceInstructionsPlayerOptions
Link copied to clipboard
fun checkIsLanguageAvailable(checkIsLanguageAvailable: Boolean): VoiceInstructionsPlayerOptions.Builder

Checks if the specified language as represented by the Locale is available and supported by TTS. Defaults to True

Link copied to clipboard
fun contentType(contentType: Int): VoiceInstructionsPlayerOptions.Builder

Specifies what source is playing (music, movie, speech, sonification, unknown). Defaults to AudioAttributes.CONTENT_TYPE_MUSIC See AudioAttributes for a list of content types.

Link copied to clipboard
Link copied to clipboard
fun streamType(streamType: Int): VoiceInstructionsPlayerOptions.Builder

Specifies which stream will be used for playing Defaults to AudioManager.STREAM_MUSIC See AudioManager for a list of stream types. Supports pre Oreo and above implementations

Link copied to clipboard
fun ttsStreamType(streamType: Int): VoiceInstructionsPlayerOptions.Builder

Specifies which stream will be used for playing TTS Defaults to AudioManager.STREAM_MUSIC See AudioManager for a list of stream types. Supports pre Oreo and above implementations

Link copied to clipboard
fun usage(usage: Int): VoiceInstructionsPlayerOptions.Builder

Specifies which stream will be used for playing Defaults to AudioManager.STREAM_MUSIC See AudioManager for a list of stream types. Supports pre Oreo and above implementations

Link copied to clipboard
fun useLegacyApi(useLegacyApi: Boolean): VoiceInstructionsPlayerOptions.Builder

Specifies attributes as inferred from the legacy stream types. Defaults to False Warning: When this value is true any other attributes such as usage, content type, flags or haptic control will be ignored