INavigationApi

interface INavigationApi

Inheritors

Properties

Link copied to clipboard
abstract val errorsState: StateFlow<Errors>

SDK and navigation errors state - monitor it to resolve problems (for example enable internet connection, gps etc.) or contact with developer (for example API key expired etc.) Custom implementation of StateFlow guarantees all changes to be notify - no conflation.

Link copied to clipboard
abstract val etaDataState: StateFlow<EtaModel?>

A StateFlow representing eta data required by EtaBar. Pass this to the composable EtaBar as the speedState parameter.

Link copied to clipboard
abstract val laneAssistantState: StateFlow<LaneAssistantModel?>

A StateFlow representing data required by the LaneAssistant composable. Pass this to the composable LaneAssistant.

Link copied to clipboard
abstract val locationState: StateFlow<LocationModel?>

A StateFlow providing data for position tracking and displaying an indicator on a map.

Link copied to clipboard
abstract val maneuversDataState: StateFlow<ManeuversModel?>

A StateFlow representing upcoming maneuver information ManeuversBar. Pass this to the composable ManeuversBar.

Link copied to clipboard
abstract val navigationState: StateFlow<NavigationState>

A StateFlow representing the current state of the navigation session

Link copied to clipboard
abstract val routesDataState: StateFlow<RoutesModel?>

A StateFlow providing data drawing route or showing route bounds.

Link copied to clipboard
abstract val sdkState: StateFlow<SdkState>

A StateFlow representing the current state of the SDK

Link copied to clipboard
abstract val soundState: StateFlow<SoundState>

A StateFlow providing data about current voice guidance state.

Link copied to clipboard
abstract val speedState: StateFlow<SpeedModel?>

A StateFlow representing current speed and speedLimit. Pass this to the composable SpeedView

Functions

Link copied to clipboard
open suspend fun awaitNavigationState(state: NavigationState, action: () -> Unit? = null)

Helper method that suspends until Navigation reaches desired state (and launches action if defined).

Link copied to clipboard
open suspend fun awaitSdkAndNavigationState(sdkState: SdkState, navigationState: NavigationState, action: () -> Unit? = null)

Helper method that suspends until SDK and Navigation reaches desired state (and launches action if defined).

Link copied to clipboard
open suspend fun awaitSdkState(state: SdkState, action: () -> Unit? = null)

Helper method that suspends until SDK reaches desired state (and launches action if defined).

Link copied to clipboard

Helper method that indicates if navigation can be stopped.

Link copied to clipboard
abstract fun dispose()

Stops any ongoing operations (including location tracking or foreground service if active etc.), cleans up internal state and releasing resources. Call this when NavigationApi is no longer needed.

Link copied to clipboard

Retrieves the IOverlayViewModel associated with the provided ViewModelStoreOwner (typically an Activity or Fragment). This ViewModel is designed for use with the NavigationMapView composable function.

Link copied to clipboard
abstract fun init(initParams: InitParams)

Initializes the SDK with the provided init parameters. This method must be called before any other SDK operations.

Link copied to clipboard
@RequiresPermission(allOf = ["android.permission.ACCESS_FINE_LOCATION", "android.permission.ACCESS_COARSE_LOCATION"])
abstract fun navigate(navigationParams: NavigationParams)

Initiates navigation to the specified parameters.

Link copied to clipboard
abstract fun sendReport(reportParams: ReportParams): Deferred<Boolean>

Sends a report to the server.

Link copied to clipboard
@RequiresPermission(allOf = ["android.permission.ACCESS_FINE_LOCATION", "android.permission.ACCESS_COARSE_LOCATION"])
abstract fun startLocationTracking()

Initiates requests for location updates.

Link copied to clipboard
abstract fun startNavigationActivity(context: Context, stopNavigationOnActivityDestroy: Boolean = false)

Starts default activity with map and all navigation views to visualise active navigation session.

Link copied to clipboard
abstract fun startVoiceGuidance()

Enables the voice navigation prompts.

Link copied to clipboard
abstract fun stopLocationTracking()

Stops the active location tracking process.

Link copied to clipboard
abstract fun stopNavigation()

Stops the currently active navigation session. This will typically stop any ongoing route guidance, remove the navigation UI, and, if a foreground service was started, stop the foreground service.

Link copied to clipboard
abstract fun stopVoiceGuidance()

Disables the voice navigation prompts.

Link copied to clipboard
abstract fun updateNavigation(event: NavigationEvent.Update, forced: Boolean = false)

Updates the currently ongoing navigation session.