Package-level declarations

Types

Link copied to clipboard

An Api that allows you to interact with the audio focus in an asynchronous way.

Link copied to clipboard

An Api that allows you to interact with the audio focus

Link copied to clipboard

Factory for creating default instance of AsyncAudioFocusDelegate.

Link copied to clipboard

Interface definition for a callback to be invoked when a player requests audio focus

Link copied to clipboard

Implementation of MapboxAudioGuidance. See interface for details.

Link copied to clipboard

Represents the state of MapboxAudioGuidance.

Link copied to clipboard
class MapboxSpeechApi @JvmOverloads constructor(context: Context, language: String, options: MapboxSpeechApiOptions = MapboxSpeechApiOptions.Builder().build())

Mapbox Speech Api that allows you to generate an announcement based on VoiceInstructions

Link copied to clipboard
class MapboxVoiceInstructionsPlayer @JvmOverloads constructor(context: Context, language: String, options: VoiceInstructionsPlayerOptions = defaultOptions(), audioFocusDelegate: AsyncAudioFocusDelegate = defaultAudioFocusDelegate(context, options), timerFactory: Provider<Timer> = defaultTimerFactory())

Hybrid implementation of MapboxVoiceInstructionsPlayer combining VoiceInstructionsTextPlayer and VoiceInstructionsFilePlayer speech players. NOTE: do not use lazy initialization for this class since it takes some time to initialize the system services required for on-device speech synthesis. With lazy initialization there is a high risk that said services will not be available when the first instruction has to be played. MapboxVoiceInstructionsPlayer should be instantiated in Activity#onCreate.

Link copied to clipboard

PlayerAttributes implements attributes that define how the audio system handles routing and focus decisions for the specified source.

Link copied to clipboard

Class that is responsible for listening to relevant updates and triggering voice instructions predownloading when needed. Register and unregister with MapboxNavigationApp.registerObserver and MapboxNavigationApp.unregisterObserver or invoke onAttached and onDetached manually if you are not using MapboxNavigationApp.