resetToTrackingMode
Resets the MSDK navigation to tracking mode after guidance ends.
This is a suspend function that must be called from Dispatchers.IO.
Steps performed:
Waits for any in-flight
stopSessionto reachSessionState.IDLE(max idleTimeoutMs)Stops the session explicitly if still not IDLE (safety net)
Delays for overlayCleanupDelayMs to let the native renderer finish cleaning up guidance overlays (route arrows, turn graphics)
Calls onRestoreLocationSource for the app to restore real GPS (from demo mode)
Sets
NavigationMapViewMode.GUIDANCE_VIEW_AUTOfor trackingStarts a new tracking session
Return
true if the tracking session started successfully, false on error
Parameters
Application context for stopSession() if needed
Callback for the app to restore the real GPS location source (in case demo mode was used during guidance). Called after the session is stopped and before the new tracking session starts.
Maximum time to wait for IDLE state (default: 3000ms)
Delay after IDLE for native overlay cleanup (default: 300ms)