-
- All Implemented Interfaces:
public interface DriveSessionThis class allows the user to set up specific parameters for the current driving session. The user can start, stop, simulate a navigation, enable, disable alert service or ADAS service.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classDriveSession.Factory
-
Method Summary
Modifier and Type Method Description abstract BitmapInforenderIcon(Integer width, Integer height, ShieldIconContext iconContext)Render shield or exit icon image abstract Task<RouteResponse>createNavigableRouteTask(RouteRequest request, HybridClientConfig config)Create a route calculation task for navigation Navigable route calculation task will calculate the route adaptive to current SDK working status including network connection status, map data activity mode, etc. abstract Task<RouteResponse>createNavigableEvTripPlanTask(EvTripPlanRequest request, HybridClientConfig config)Create a EV trip planning task for navigation Navigable EV trip planning task will calculate the EV trip plan adaptive to current SDK working status including network connection status, map data activity mode, etc. abstract NavigationSessionstartNavigation(Route route, Boolean isSimulation, Double simulateSpeedMetersPErSecond)start navigation session, if already exists navigation session, needs to stop it before start a new session. abstract BooleanstopNavigation()Stop the current navigation session Once the session is stopped, the session object will be destroyed abstract Unitdispose()Clean up memory and data context maintain in DriveSession. abstract UnitinjectLocationProvider(LocationProvider locationProvider)inject customized location provider. abstract EventHubgetEventHub()retrieve event trigger source, using for event listening abstract SettingsgetSettings()Get the tool used for setting drive session abstract AudioGuidanceManagergetAudioGuidanceManager()return a instance of AudioGuidanceManager AudioGuidanceManager abstract AlertManagergetAlertManager()return a instance of AlertManager AlertManager -
-
Method Detail
-
renderIcon
abstract BitmapInfo renderIcon(Integer width, Integer height, ShieldIconContext iconContext)
Render shield or exit icon image
- Parameters:
width- : icon width in pixelheight- : icon height in pixeliconContext- : context of the icon retrieved from highway shield info, highway exit info or turn by turn list
-
createNavigableRouteTask
abstract Task<RouteResponse> createNavigableRouteTask(RouteRequest request, HybridClientConfig config)
Create a route calculation task for navigation Navigable route calculation task will calculate the route adaptive to current SDK working status including network connection status, map data activity mode, etc. For routing request with content level set to other than full level, the content level will be promoted to full level for navigation purpose.
- Parameters:
request- : route calculation requestconfig- : configuration for hybrid mode calculation, default is null which indicates default configuration will be used
-
createNavigableEvTripPlanTask
abstract Task<RouteResponse> createNavigableEvTripPlanTask(EvTripPlanRequest request, HybridClientConfig config)
Create a EV trip planning task for navigation Navigable EV trip planning task will calculate the EV trip plan adaptive to current SDK working status including network connection status, map data activity mode, etc.
- Parameters:
request- : EV trip planning requestconfig- : configuration for hybrid mode calculation, default is null which indicates default configuration will be used
-
startNavigation
abstract NavigationSession startNavigation(Route route, Boolean isSimulation, Double simulateSpeedMetersPErSecond)
start navigation session, if already exists navigation session, needs to stop it before start a new session.
The SDK only supports routes without hard restriction to start navigation for commercial vehicles(CV), or an Exception will be thrown. Once started, the profile of CV will not change during the navigation session.
- Parameters:
route- :Route info, may contain route and guidanceisSimulation- : real navigation or demonstrate navigation modesimulateSpeedMetersPErSecond- : demonstrate navigation speed, in meters per second, been used only value of demonstrateMode is true.
-
stopNavigation
abstract Boolean stopNavigation()
Stop the current navigation session Once the session is stopped, the session object will be destroyed
-
injectLocationProvider
abstract Unit injectLocationProvider(LocationProvider locationProvider)
inject customized location provider.
by default, drive session will acquire latest location from system location manager, if user specify customized location provider, will use it with higher priority.
- Parameters:
locationProvider- customized location provider for non-null instance, please see definition of LocationProvider null value will switch back to system location provider
-
getEventHub
abstract EventHub getEventHub()
retrieve event trigger source, using for event listening
-
getSettings
abstract Settings getSettings()
Get the tool used for setting drive session
-
getAudioGuidanceManager
abstract AudioGuidanceManager getAudioGuidanceManager()
return a instance of AudioGuidanceManager AudioGuidanceManager
-
getAlertManager
abstract AlertManager getAlertManager()
return a instance of AlertManager AlertManager
-
-
-
-