Mapbox Navigation SDK v0.12.0
Release Notes
*** Release uses Java 8 (static interface method) ***
If you run into this error when updating the SDK:
Static interface methods are only supported starting with Android N (--min-api 24): com.mapbox.geojson.Geometry com.mapbox.geojson.Geometry.fromJson(java.lang.String)
Message{kind=ERROR, text=Static interface methods are only supported starting with Android N (--min-api 24): com.mapbox.geojson.Geometry com.mapbox.geojson.Geometry.fromJson(java.lang.String), sources=[Unknown source file], tool name=Optional.of(D8)}
The static interface method used in com.mapbox.geojson.Geometry
is compatible with any minSdkVersion (see Supported Java 8 Language Features and APIs).
To fix the issue you're seeing, ensure that you are using Gradle version 3.0
or greater, then you can add this to your build.gradle
:
android {
...
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
This can also be done via your project settings (File > Project Structure > Your_Module > Source Compatibility / Target Compatibility).
With Android Studio 3.1.0, you should not run into this issue, as the new dex compiler D8
will be enabled by default.
Release contains API Breaking Changes → See Navigation UI Notes
Navigation Core libandroid-navigation
- Complete rework of how we validate incoming
Location
updates from the device GPS. #690 updated this logic, where we were previously checking if the update had speed and a horizontal accuracy of < 100 meters. - Bug fixes
- Issue with disabling off-route detection fixed
- Index out of bounds for decoding step geometry fixed
Navigation UI libandroid-navigation-ui
- #782 (breaking change) introduced
NavigationLauncherOptions
to be used withNavigationLauncher
.- Both
NavigationLauncherOptions
andNavigationViewOptions
subclassNavigationOptions
as there a few shared variables between both options objects. - Previously
NavigationViewOptions
were used withNavigationLauncher
as well asNavigationView#startNavigation
. This didn't make sense becauseNavigationLauncher
wasn't considering all of the variables passed fromNavigationViewOptions
, such as the listeners.
- Both
- The navigation UI now supports with 12 / 24 hour arrival-time formatting with an option added to
NavigationViewOptions
#805 - With #808, during off-route scenarios, the navigation UI will select the most similar route (compared to the one you were driving along) from the list of routes returned from our Directions API. Previously, we were always selecting the fastest from A to B.
Changelog:
- Add
MapboxNavigationOptions
to adjust location validation thresholds #818 - Set default driving profile and check for empty profile #816
- Update to MAS 3.0.1 #815
- Added safety for
NONE_SPECIFIED
type for voice units #811 - Add stick to chosen route when re-routing with UI functionality #808
- Remove
NavigationView
lifecycle observer and add Fragment Example #806 - Add 12/24 hour format to
NavigationViewOptions
#805 - Fixed unit type was defaulting to imperial #804
- Update ISSUE_TEMPLATE.md #798
- Decrease Robo tests time to 5 minutes #795
- Send departure event with a valid distance traveled #789
- Remove last location check from location validation #788
- Add localization instructions #785
- Extract
NavigationEngine
processing logic and add tests #784 - Fix OffRoute detection disabled bug #783
- Create separate options for Launcher and View #782
- Create LocationValidator for checking new location updates #690