Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

EV alerting error observable methods

Link copied to clipboard

Alerting observable methods

Link copied to clipboard
Link copied to clipboard

Arrival observable methods

Link copied to clipboard

indicates if the guidance's instructions will be played or not. Default value is true.

Link copied to clipboard

the base path to the audio files. Works with audioFilesFolderRelativePath. If not specified (null), default value will be used with Core.getInstance().getExternalScopedStoragePath()

Link copied to clipboard

the relative path (from the audioFilesBasePath) to the folder containing all audio files folders (one for each language)

Link copied to clipboard

Better route with traffic observable methods

Link copied to clipboard

the Route used for the current guidance. Its value will only change when startSession will be called, or when re-route events occur during a session of type SessionState.GUIDANCE

Link copied to clipboard

Current route updates observable methods

Link copied to clipboard

Instructions observable methods

Link copied to clipboard

Enable or disable safety camera alerts, or get the current value.

Link copied to clipboard

an US-ASCII string that defines an ISO 639-1 (2-letter) language code that defines the language used for guidance's instructions (Text-to-Speech and Audio files). Default value is "en".

Link copied to clipboard

the MapView attached to this Navigation

Link copied to clipboard

If true the navigation will use metric unit system (default). Otherwise, if false, it'll use imperial unit system.

Link copied to clipboard

Navigation error observable methods

Link copied to clipboard

the absolute path to the icon path used for vehicle icon during navigation. If not specified (null), default value will be used with Core.getInstance().getExternalScopedStoragePath() and navigation_icon_default_name res.

Link copied to clipboard

NavigationProgress observable methods

Link copied to clipboard

Re-routing observable methods

Link copied to clipboard

Safety Alerts observable methods

Link copied to clipboard

SpeedLimit observable methods

Link copied to clipboard

indicates if the guidance's instructions will be played using Text-to-Speech. Default value if true. If set to false, audio files will be used instead (using resources deployed from the assets).

Link copied to clipboard

If true TTS instructions will include the road name

Link copied to clipboard

Functions

Link copied to clipboard
open override fun addAlertListener(listener: AlertListener)
Link copied to clipboard
open override fun addArrivalListener(listener: ArrivalListener)
Link copied to clipboard
open override fun addBetterRouteListener(listener: BetterRouteListener)
Link copied to clipboard
open override fun addCurrentRouteListener(listener: CurrentRouteListener)
Link copied to clipboard
open override fun addEVAlertingListener(listener: EVAlertingListener)
Link copied to clipboard
open override fun addInstructionsListener(listener: InstructionsListener)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun addReroutingListener(listener: ReroutingListener)
Link copied to clipboard
Link copied to clipboard
open override fun addSpeedLimitListener(listener: SpeedLimitListener)
Link copied to clipboard
fun attachMapView(mapView: MapView, verticalVehiclePos: Double = 0.23): Error?

Attach a MapView to the navigation

Link copied to clipboard

Changes the location data source for the navigation engine. Before calling this method, make sure that the navigation session is stopped.

Link copied to clipboard
fun detachMapView(): Error?

Detach the current attached MapView

Link copied to clipboard

Get the navigation view mode of the current attached MapView

Link copied to clipboard

Returns the current session state

Link copied to clipboard
fun hidePassedRoute(appContext: Context, hide: Boolean)

Determines if route display should hide the route section between start and current vehicle's position (default is false).

Link copied to clipboard

Initializes the location data source for the navigation engine. You can use isInit to check if engine is initialized with a LocationDataSource

Link copied to clipboard

Returns true if the Navigation engine has been successfully initialized with a LocationDataSource using initLocationDataSource

Link copied to clipboard
fun isTTSAvailable(appContext: Context): Boolean
Link copied to clipboard
fun muteAudio()

Mute the vocal instruction without stopping it

Link copied to clipboard
open override fun onCreate(owner: LifecycleOwner)
Link copied to clipboard
open override fun onDestroy(owner: LifecycleOwner)
Link copied to clipboard
open override fun onMapDestroyed()

Called when the attached MapView is destroyed.

Link copied to clipboard
open fun onNewInstruction(instruction: String, maneuver: Bitmap?, chainedManeuver: Bitmap?, signpost: Bitmap?, laneInfo: Bitmap?)

Notifies when a new instruction is available during guidance. It provides the instruction's text, the maneuver icon for the instruction, the chained maneuvers icon if any, the signpost icon if any, and the lane info icon if any.

Link copied to clipboard
open override fun onNewTextInstruction(instruction: String)

Notifies when a new text instruction is available during guidance.

Link copied to clipboard
open override fun onNewVocalInstruction(instruction: String, type: AudioType)

Instructions callback

Link copied to clipboard
open override fun onPause(owner: LifecycleOwner)
Link copied to clipboard
open override fun onResume(owner: LifecycleOwner)
Link copied to clipboard
open override fun onStart(owner: LifecycleOwner)
Link copied to clipboard
open override fun onStop(owner: LifecycleOwner)
Link copied to clipboard
open override fun removeAlertListener(listener: AlertListener)
Link copied to clipboard
open override fun removeAllAlertListeners()
Link copied to clipboard
open override fun removeAllArrivalListeners()
Link copied to clipboard
open override fun removeAllBetterRouteListeners()
Link copied to clipboard
open override fun removeAllCurrentRouteListeners()
Link copied to clipboard
open override fun removeAllEVAlertingListeners()
Link copied to clipboard
open override fun removeAllInstructionsListeners()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun removeAllReroutingListeners()
Link copied to clipboard
Link copied to clipboard
open override fun removeAllSpeedLimitListeners()
Link copied to clipboard
open override fun removeArrivalListener(listener: ArrivalListener)
Link copied to clipboard
open override fun removeBetterRouteListener(listener: BetterRouteListener)
Link copied to clipboard
Link copied to clipboard
open override fun removeEVAlertingListener(listener: EVAlertingListener)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun removeReroutingListener(listener: ReroutingListener)
Link copied to clipboard
Link copied to clipboard
open override fun removeSpeedLimitListener(listener: SpeedLimitListener)
Link copied to clipboard
fun reroute(length: Int = 0, offset: Int = 0, findCharges: Boolean = false)

Forces rerouting (for guidance mode only): Recomputes route after blocking road segments of current route starting from next intersection and within a given length. Call this method during guidance process if you wish to force rerouting

Link copied to clipboard

This method resumes the navigation thread. After a successful call to suspend, the navigation thread remains suspended until this method is called.

Link copied to clipboard
fun setMaxRouteLengthDisplay(appContext: Context, length: Int)

This option defines the maximum length (in meters) of the route to be displayed.

Link copied to clipboard

Sets the navigation view mode of the current attached MapView It should be called after Navigation.attachMapView

Link copied to clipboard

Set the remote planner proxy.

Link copied to clipboard
fun setRemotePlannerOptions(allowLocalRerouting: Boolean = false, checkForBetterRoutePeriod: Long = 300, minDurationForBetterRoute: Long = 300, minDistanceForBetterRoute: Long = 2000): Boolean

Set the remote planner options.

Link copied to clipboard
fun setRouteWaypointsVisibility(appContext: Context, isVisible: Boolean)

Shows or hides route waypoints. It has to be called before starting a guidance session.

Link copied to clipboard
fun setStartUTurnThreshold(appContext: Context, startUTurnThreshold: Int)

This option determines, at start point or any via point for which an avoid UTurn restriction is set, the threshold of the difference of ETA between avoiding a UTurn or not, above which UTurn is allowed.

Link copied to clipboard
fun setVehicleHorizontalPosition(horizontalVehiclePos: Double = 0.5): Boolean

Sets the horizontal position of the vehicle symbol on the attached MapView. The position is defined as a percentage of the MapView width, where 0.5 represents the center. Values less than 0.5 shift the vehicle to the left, values greater than 0.5 shift it to the right.

Link copied to clipboard
fun setVehicleResource(imageFile: File?)

Set path to the vehicle resource that'll be drawn by the navigation directly The vehicle will be drawn only when StartSession is called

Link copied to clipboard
fun setVehicleVerticalPosition(verticalVehiclePos: Double = 0.23): Boolean

Sets the vertical position of the vehicle symbol on the attached MapView. The position is defined as a percentage of the MapView height, measured from the bottom of the screen.

Link copied to clipboard
fun startSession(appContext: Context? = null, notificationContent: ForegroundNotificationContent? = null, route: Route? = currentRoute, instructionsIconsStyles: InstructionsIconsStyles? = null): Error?

Starts a navigation session with the passed route

Link copied to clipboard
fun stopAudio()

Stops the current vocal instruction

Link copied to clipboard

Stops the foreground notification if its running

Link copied to clipboard
open fun stopSession(appContext: Context? = null): Error?

Stops the current session.

Link copied to clipboard
fun suspend(inMaxTime: Long = 2000): Boolean

This method attempts to suspend the navigation thread in order to keep the current navigation position data which contains among other information pointers on current position, route and route sheet.

Link copied to clipboard

Unmute the vocal instruction

Link copied to clipboard
fun updateRouteOptions(routeOptions: RouteOptions): Error?

Updates the current route options for the currentRoute. A re-route will occur and the currentRoute will be updated during a guidance. If this method is called when the navigation is not in guidance, it will return an error.

Link copied to clipboard
fun updateVehicleProfile(profile: Profile): Error?

Updates the current vehicle profile for the currentRoute. A re-route will occur and the currentRoute will be updated during a guidance. If this method is called when the navigation is not in guidance, it will return an error.

Link copied to clipboard
fun updateVehicleStatus(vehicleStatus: VehicleStatus): Error?

Updates the vehicle status for the navigation