Mapbox Navigation SDK v0.23.0
Release Notes
Important Note: With this release, you must include the following snippet in your project’s build.gradle
:
repositories {
maven { url 'https://mapbox.bintray.com/mapbox' }
}
This will ensure the mapbox
dependency is properly downloaded. We will be adding a snippet regarding this in the repo README
as well.
This release breaks contains API breaking changes. Please consult this migration guide for the necessary updates required.
Core Navigation libandroid-navigation
- We added a
RouteProgressState
that gives information about when a user has arrived, as well as a lot of other information given to us via theNavigator
RouteState
.- Example usage to detect when a user has arrived at the end of the given
RouteLeg
:
- Example usage to detect when a user has arrived at the end of the given
@Override
public void onProgressChange(Location location, RouteProgress routeProgress) {
Integer currentState = routeProgress.currentState();
if (currentState != null && currentState == RouteProgressState.ROUTE_ARRIVED) {
// Arrived at the end of the leg!
}
}
- Check out
RouteProgressState
to see the different types of state events you can receive.
Navigation UI libandroid-navigation-ui
- We added an API that will allow custom map padding for the
NavigationView
. This is useful for scenarios where you would like to adjust the location icon’s position on the screen (like centered for an arial view):
// To center the location icon
int[] customPadding = {0, 0, 0, 0};
navigationView.retrieveNavigationMapboxMap().updateLocationIconWith(customPadding);
- We added APIs to
InstructionView
andNavigationView
to enable / disable theNavigationAlertView
(enabled by default).
// To disable the NavigationAlertView
navigationView.retrieveAlertView().updateEnabled(false);
- We added an
NavigationView#initialize
method that takes aCameraPosition
to address the poor “fly-in” UX behavior (from starting theMapView
at a world-view camera position):
CameraPosition initialPosition = new CameraPosition.Builder()
.target(new LatLng(ORIGIN.latitude(), ORIGIN.longitude()))
.zoom(INITIAL_ZOOM)
.build();
navigationView.initialize(this, initialPosition);
Changelog:
- Add RouteProgressState to RouteProgress for current Navigator information #1502
- Remove LocationValidator and force last Location if found #1498
- Update MapRouteProgressChangeListener to be aware of route visibility #1482
- Remove MapboxNavigationOptions ignored by Navigator #1500
- Check for valid geocoding response in ExamplePresenter #1499
- Better clarify the Mapbox Navigator dependency #1496
- Add example test Activity for Navigation Test Application #1317
- Bump mapbox-navigation-native version to 3.3.1 #1495
- Add Mapbox Navigator TOS to the license #1494
- Bump Maps SDK and Events versions #1493
- Resume simulation for multi leg routes #1490
- Remove dynamic padding way name adjustment for MapWayname #1473
- Remove unnecessary force first location update from route (origin) #1488
- Add CameraPosition option for initializing NavigationView #1483
- Rebuild RemoteViews for MapboxNavigationNotification on each update #1474
- Update time remaining TextView to auto-size for longer durations #1479
- Fix mock location generation in ReplayRouteLocationConverter #1476
- Update Maps SDK to 6.6.2 #1475
- Bump mapbox-navigation-native version to 3.2.1 #1470
- Allow access to AlertView and the ability to enable or disable #1466
- Update Transifex to latest German translations #1476