We started building our mobile app a while ago when the premium SDK was still maintained. Now Here decided to deprecate that SDK and we must switch to another one. However we were using the Turn-By-Turn navigation where we were getting the ETA information real time using the NavigationManager GetETA(). This way we could get the ETA updated along the route without having to use multiple API requests (which would be insanely cost consuming). How can I achieve that with the Explore SDK ? I see the following note on the Explore SDK documentation: https://developer.here.com/documentation/android-sdk-explore/4.13.5.0/dev_guide/topics/routing.html
Note Tip: If a driver is moving, the bearing value can help to improve the route calculation: startWaypoint.headingInDegrees = location.bearingInDegrees;.
Can someone confirm that I can get the ETA updated real time without calling multiple times the Get Route API ?
Thanks in advance for helping.
Updating the ETA can be costly, so it is made more transparent in the 4.x version of the HERE SDK. Take a look at this guide and scroll to the "Update Traffic on Route" section.
The
RouteProgressevent delivers the estimated travel time:However, this is not automatically updating real-time traffic during the run, so the updated time reflects only the time from route calculation while progressing to destination.
So, if you want to update the traffic, call
refreshRoute()whenever you need a new ETA or call it periodically. SincerefreshRoute()will not modify the current route, you only need to set the route to the navigator (this can be done any time) - and thenRouteProgresswill contain the updated times.If you want to take the ETA from the
Route, you can do it like this:You can get the ETA only directly from the
Route(or you can calculate it from the remaining duration).Alternatively, you can also use the
DynamicRouteEngineto find better route alternatives and to bypass traffic obstacles automatically.