Interface ReroutingByTrafficListener


  • public interface ReroutingByTrafficListener
    Interface allowing to receive notifications about changes of the status of the automatic rerouting by traffic handling process.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void onReroutingByTrafficOccurred​(int oldTimeToDestinationInSeconds, int newTimeToDestinationInSeconds, Route newRoute, boolean doesNewRouteResembleOldOne, java.util.ArrayList<Route> alternativeRoutes)
      The method is called once rerouting by traffic occurred.
    • Method Detail

      • onReroutingByTrafficOccurred

        void onReroutingByTrafficOccurred​(int oldTimeToDestinationInSeconds,
                                          int newTimeToDestinationInSeconds,
                                          Route newRoute,
                                          boolean doesNewRouteResembleOldOne,
                                          java.util.ArrayList<Route> alternativeRoutes)
        The method is called once rerouting by traffic occurred.
        Parameters:
        oldTimeToDestinationInSeconds - Old time to destination in seconds;
        newTimeToDestinationInSeconds - New time to destination in seconds;
        newRoute - New route being navigated after rerouting occurred or 'null' if old route is used;
        doesNewRouteResembleOldOne - Indicates whether the newRoute resembles the old one being navigated before rerouting occurred. Can only be 'false' if the newRoute is non-null.
        alternativeRoutes - List of alternative routes you may use to navigate if some available and 'null' otherwise.