/
Route emulation (v2.1.x - Android)

Route emulation (v2.1.x - Android)

It’s possible to emulate route navigation for demonstration purposes using the RouteEmulator object returned from the Sdk.getRouteEmulator() method.

To start emulation, first calculate a route, then pass it to the startEmulation() method. To change the speed used for the emulation, use the setRequiredSpeed() method and to stop it, use stopEmulation().

Using the addListener() method, a listener can also be added to receive notifications when route emulation starts or ends.

Example:

private final RouteEmulator.Listener routeEmulatorListener = new RouteEmulator.Listener() { @Override public void onEmulationStarted() { Toast.makeText( activity, "Route emulation started", Toast.LENGTH_SHORT).show(); } @Override public void onEmulationFinished() { Toast.makeText( activity, "Route emulation finished", Toast.LENGTH_SHORT).show(); } }; RouteEmulator routeEmulator = sdk.getRouteEmulator(); routeEmulator.addListener(routeEmulatorListener); routeEmulator.startEmulation(calculatedRoute, 65);

 

Related content

Routing (v2.1.x - Android)
Routing (v2.1.x - Android)
More like this
Navmii SDK v2.1.x for Android
Navmii SDK v2.1.x for Android
Read with this
Route Navigation (v2.1.x - Android)
Route Navigation (v2.1.x - Android)
More like this
Map (v2.1.x - Android)
Map (v2.1.x - Android)
Read with this
Route Visualization (v2.1.x - Android)
Route Visualization (v2.1.x - Android)
More like this
Places and coordinates (v2.1.x - Android)
Places and coordinates (v2.1.x - Android)
Read with this