Package 

Interface DriveSession

  • All Implemented Interfaces:

    
    public interface DriveSession
    
                        

    This 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.

    • Constructor Detail

    • Method Detail

      • renderIcon

         abstract BitmapInfo renderIcon(Integer width, Integer height, ShieldIconContext iconContext)

        Render shield or exit icon image

        Parameters:
        width - : icon width in pixel
        height - : icon height in pixel
        iconContext - : 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 request
        config - : 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 request
        config - : 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 guidance
        isSimulation - : real navigation or demonstrate navigation mode
        simulateSpeedMetersPErSecond - : 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

      • dispose

         abstract Unit dispose()

        Clean up memory and data context maintain in DriveSession.

      • 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

      • getAlertManager

         abstract AlertManager getAlertManager()

        return a instance of AlertManager AlertManager