Skip to content

Commit 3359656

Browse files
author
Łukasz Paczos
committed
update Common SDK to v23.2.0-rc.3, Maps SDK to v10.10.0-rc.1, Nav Native v122.0.0, and mapbox-java to v6.10.0-beta.3
1 parent 6894410 commit 3359656

File tree

35 files changed

+310
-177
lines changed

35 files changed

+310
-177
lines changed

CHANGELOG.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Mapbox welcomes participation and contributions from everyone.
77
- Introduced `ReplayRouteSession` and `ReplayRouteSessionOptions`. When enabled the active route will be simulated. This will replay routes in a memory efficient way, so you can simulate long routes at high location frequencies. [#6636](https://github.com/mapbox/mapbox-navigation-android/pull/6636)
88
- Added building highlight on arrival support to `NavigationView`. Added new customization options `ViewOptionsCustomization.enableBuildingHighlightOnArrival` and `ViewOptionsCustomization.buildingHighlightOptions`. [#6651](https://github.com/mapbox/mapbox-navigation-android/pull/6651)
99
- Added `ComponentInstaller` for the `BuildingHighlightComponent` that offers simplified integration of the `MapboxBuildingsApi` and `MapboxBuildingView`. [#6651](https://github.com/mapbox/mapbox-navigation-android/pull/6651)
10+
- Introduced parallelization of route requests made with `MapboxNavigation#requestRoutes`. Now, if an offboard route request fails or times out (the default timeout has been decreased from 10 seconds to 5 seconds), we're already in the process of calculating an onboard route to decrease the time needed to provide a usable route to the user, as long as we have the data cached or pre-downloaded to succeed with an onboard request. [#6659](https://github.com/mapbox/mapbox-navigation-android/pull/6659)
1011
#### Bug fixes and improvements
1112
- Fixed an issue in the `NavigationView` where the last audio instruction from the previous session becomes the 1st on the next session. [#6662](https://github.com/mapbox/mapbox-navigation-android/pull/6662)
1213
- Fixed crash in `PermissionsLauncherFragment` occurring on device rotation. [#6635](https://github.com/mapbox/mapbox-navigation-android/pull/6635)
@@ -18,9 +19,51 @@ Mapbox welcomes participation and contributions from everyone.
1819
- Added minor optimization to vanishing route line calculations by checking if the incoming point equal to the previous point in order to avoid recalculation and re-rendering. [#6643](https://github.com/mapbox/mapbox-navigation-android/pull/6643)
1920
- Improved performance of `MapboxRouteLineApi#updateWithRouteProgress` function execution. [#6648](https://github.com/mapbox/mapbox-navigation-android/pull/6648)
2021
- Fixed a rare issue where the offset marking the traveled portion of the route would be ahead of the user location puck, especially around sharp maneuvers. [#6648](https://github.com/mapbox/mapbox-navigation-android/pull/6648)
21-
- Supported applying latest EV data provided via `MapboxNavigation#onEVDataUpdated` to EV reroute requests. [#6650](https://github.com/mapbox/mapbox-navigation-android/pull/6650)
2222
- Fixed an issue where reroute requests where not applying the latest EV data provided via `MapboxNavigation#onEVDataUpdated`. [#6650](https://github.com/mapbox/mapbox-navigation-android/pull/6650)
2323
- Added `NavigationRoute#waypoints` as the source of truth for `DirectionsWaypoint`s which can be common for all routes or route specific depending on `RouteOptions#waypointsPerRoute()` parameter. [#6555](https://github.com/mapbox/mapbox-navigation-android/pull/6555)
24+
- Improved behavior in tunnels and underground parking lots for `DeviceType#AUTOMOBILE` by preventing tunnel-induced location simulation while we're off-road and vice-versa preventing generation of off-road location samples in tunnels. [#6659](https://github.com/mapbox/mapbox-navigation-android/pull/6659)
25+
- Improved fork detection in tunnels for `DeviceType#AUTOMOBILE`. [#6659](https://github.com/mapbox/mapbox-navigation-android/pull/6659)
26+
- :warning: Changed `NavigationRouteAlternativesObserver` to only return the latest generated set of possible alternative routes to prevent accumulation of routes. This decreases the applicable usages of `AlternativeRouteMetadata#alternativeId` as the ID will be rebuilt in most of the cases. Future releases will provide improved mechanism to help understand similarity of continuously delivered alternative routes. [#6659](https://github.com/mapbox/mapbox-navigation-android/pull/6659)
27+
- Improved location generation on multi-level roads for `DeviceType#AUTOMOBILE`, especially focusing on avoiding snapping the user location to the incorrect level or inaccessible parallel road. [#6659](https://github.com/mapbox/mapbox-navigation-android/pull/6659)
28+
- Fixed an issue where `NavigationRouteAlternativesObserver` would fire unnecessarily often with new sets of routes. [#6659](https://github.com/mapbox/mapbox-navigation-android/pull/6659)
29+
- Optimized predictive resource caching and reduced peak memory and CPU consumption on very long and complex routes. [#6659](https://github.com/mapbox/mapbox-navigation-android/pull/6659)
30+
- Fixed an issue for `DeviceType#AUTOMOBILE` where entering a tunnel just after exiting a previous one (in a short time frame) could lead to incorrect location simulation. [#6659](https://github.com/mapbox/mapbox-navigation-android/pull/6659)
31+
32+
#### Known issues :warning:
33+
This release adds copies of classes under `com.mapbox.android.core.location` and `com.mapbox.android.core.permissions` packages from `com.mapbox.mapboxsdk:mapbox-android-core` artifact directly into the binary. This means that if you explicitly define a dependency on `com.mapbox.mapboxsdk:mapbox-android-core` artifact you can run into a duplicate class error, for example:
34+
```
35+
Execution failed for task ':{module}:checkReleaseDuplicateClasses'.
36+
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
37+
> Duplicate class com.mapbox.android.core.location.LocationEngine found in modules jetified-common-23.2.0-rc.3-runtime (com.mapbox.common:common:23.2.0-rc.3) and jetified-mapbox-android-core-5.0.2-runtime (com.mapbox.mapboxsdk:mapbox-android-core:5.0.2)
38+
```
39+
If you do run into this error, make sure to remove the direct `com.mapbox.mapboxsdk:mapbox-android-core` dependency from your build script. If you're not defining the dependency directly, make sure that you're using compatible Mapbox dependencies or as a last resort exclude the artifact from any other transitive dependency that might be bringing it in, for example:
40+
```
41+
implementation(sdkDependency) {
42+
exclude group: 'com.mapbox.mapboxsdk', module: 'mapbox-android-core'
43+
}
44+
```
45+
46+
The copies of the classes currently come in with minor type incompatibilities but these will be resolved with the upcoming pre-releases, before the changes become stable. The incompatibilities you can run into require changes like:
47+
```diff
48+
object : LocationEngineCallback<LocationEngineResult> {
49+
- override fun onSuccess(result: LocationEngineResult) {
50+
- result.lastLocation?.let {
51+
+ override fun onSuccess(result: LocationEngineResult?) {
52+
+ result?.lastLocation?.let {
53+
// ...
54+
}
55+
// ...
56+
}
57+
```
58+
```diff
59+
object : PermissionsListener {
60+
- override fun onExplanationNeeded(permissionsToExplain: MutableList<String>?) {
61+
+ override fun onExplanationNeeded(permissionsToExplain: List<String?>?) {
62+
// ...
63+
}
64+
// ...
65+
}
66+
```
2467

2568
## Mapbox Navigation SDK 2.9.3 - 01 December, 2022
2669
### Changelog

LICENSE.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -275,12 +275,6 @@ License: [Mapbox Terms of Service](https://www.mapbox.com/legal/tos)
275275

276276
===========================================================================
277277

278-
Mapbox Navigation uses portions of the Mapbox Android Telemetry Core (Mapbox Android Core Library).
279-
URL: [https://github.com/mapbox/mapbox-events-android](https://github.com/mapbox/mapbox-events-android)
280-
License: [MIT](https://mit-license.org)
281-
282-
===========================================================================
283-
284278
Mapbox Navigation uses portions of the Mapbox Annotations (Artifact that provides Mapbox module and plugin annotations).
285279
URL: [https://github.com/mapbox/mapbox-base-android](https://github.com/mapbox/mapbox-base-android)
286280
License: [BSD](https://opensource.org/licenses/BSD-2-Clause)
@@ -1459,12 +1453,6 @@ License: [BSD](https://opensource.org/licenses/BSD-2-Clause)
14591453

14601454
===========================================================================
14611455

1462-
Mapbox Navigation uses portions of the Mapbox Android Telemetry Core (Mapbox Android Core Library).
1463-
URL: [https://github.com/mapbox/mapbox-events-android](https://github.com/mapbox/mapbox-events-android)
1464-
License: [MIT](https://mit-license.org)
1465-
1466-
===========================================================================
1467-
14681456
Mapbox Navigation uses portions of the Mapbox Annotations (Artifact that provides Mapbox module and plugin annotations).
14691457
URL: [https://github.com/mapbox/mapbox-base-android](https://github.com/mapbox/mapbox-base-android)
14701458
License: [BSD](https://opensource.org/licenses/BSD-2-Clause)

examples/src/main/java/com/mapbox/navigation/examples/MainActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ class MainActivity : AppCompatActivity(), PermissionsListener {
152152
locationPermissionsHelper.onRequestPermissionsResult(requestCode, permissions, grantResults)
153153
}
154154

155-
override fun onExplanationNeeded(permissionsToExplain: MutableList<String>?) {
155+
override fun onExplanationNeeded(permissionsToExplain: List<String?>?) {
156156
Toast.makeText(
157157
this,
158158
"This app needs location permission in order to show its functionality.",

gradle/dependencies.gradle

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,15 @@ ext {
1313
// version which we should use in this build
1414
def mapboxNavigatorVersion = System.getenv("FORCE_MAPBOX_NAVIGATION_NATIVE_VERSION")
1515
if (mapboxNavigatorVersion == null || mapboxNavigatorVersion == '') {
16-
mapboxNavigatorVersion = '121.0.0'
16+
mapboxNavigatorVersion = '122.0.0'
1717
}
1818
println("Navigation Native version: " + mapboxNavigatorVersion)
1919

2020
version = [
21-
mapboxMapSdk : '10.10.0-beta.1',
22-
mapboxSdkServices : '6.10.0-beta.2',
23-
mapboxCore : '5.0.2',
21+
mapboxMapSdk : '10.10.0-rc.1',
22+
mapboxSdkServices : '6.10.0-beta.3',
2423
mapboxNavigator : "${mapboxNavigatorVersion}",
25-
mapboxCommonNative : '23.2.0-beta.1',
24+
mapboxCommonNative : '23.2.0-rc.3',
2625
mapboxCrashMonitor : '2.0.0',
2726
mapboxAnnotationPlugin : '0.8.0',
2827
mapboxBaseAndroid : '0.8.0',
@@ -77,7 +76,6 @@ ext {
7776
mapboxSdkTurf : "com.mapbox.mapboxsdk:mapbox-sdk-turf:${version.mapboxSdkServices}",
7877
mapboxSdkDirectionsModels : "com.mapbox.mapboxsdk:mapbox-sdk-directions-models:${version.mapboxSdkServices}",
7978
mapboxSdkRefreshModels : "com.mapbox.mapboxsdk:mapbox-sdk-directions-refresh-models:${version.mapboxSdkServices}",
80-
mapboxCore : "com.mapbox.mapboxsdk:mapbox-android-core:${version.mapboxCore}",
8179
mapboxNavigator : "com.mapbox.navigator:mapbox-navigation-native:${version.mapboxNavigator}",
8280
mapboxCommonNative : "com.mapbox.common:common:${version.mapboxCommonNative}",
8381
mapboxMapsAndroidAuto : "com.mapbox.extension:maps-androidauto:${version.mapboxMapsAndroidAuto}",

gradle/verify-common-sdk-version.gradle

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,26 @@ task verifyCommonSdkVersion(dependsOn: generateDependencyReportFile) {
1919
String dependenciesString = dependenciesFile.text.substring(startIndex, lastIndex)
2020

2121
// find all Common SDK versions
22-
Set<String> commonVersions = new ArrayList<>()
22+
Set<String> commonVersions = new HashSet<>()
2323
Pattern p = Pattern.compile("com.mapbox.common:common:\\d+\\.\\d+\\.[^\\s]+")
2424
Matcher m = p.matcher(dependenciesString)
2525
while (m.find()) {
2626
String[] elements = m.group().split(":")
2727
commonVersions.add(elements[elements.length - 1])
2828
}
2929

30-
if (commonVersions.size() > 1) {
30+
// todo remove after upgrading to Common SDK v23.2.0
31+
// this allowed for Maps SDK v10.10.0-rc.1 (with Common SDK v23.2.0-rc.3)
32+
// but it also comes with GL-Native v10.10.0-rc.1 (with Common SDK v23.2.0-rc.2)
33+
Set<String> allowedCombination = new HashSet<>()
34+
allowedCombination.add("23.2.0-rc.2")
35+
allowedCombination.add("23.2.0-rc.3")
36+
37+
if (commonVersions == allowedCombination) {
38+
println(
39+
"Detected combination of Common SDK versions 23.2.0-rc.2 and 23.2.0-rc.3 which is allowed as a workaround."
40+
)
41+
} else if (commonVersions.size() > 1) {
3142
// verify that major and minor versions are consistent
3243
String mismatchArea = null
3344

instrumentation-tests/src/androidTest/java/com/mapbox/navigation/instrumentation_tests/core/BannerAndVoiceInstructionsTest.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import com.mapbox.navigation.testing.ui.utils.getMapboxAccessTokenFromResources
1818
import junit.framework.Assert.assertEquals
1919
import kotlinx.coroutines.async
2020
import kotlinx.coroutines.flow.first
21+
import org.junit.Ignore
2122
import org.junit.Rule
2223
import org.junit.Test
2324

@@ -35,6 +36,7 @@ class BannerAndVoiceInstructionsTest : BaseTest<EmptyTestActivity>(EmptyTestActi
3536
}
3637

3738
@Test
39+
@Ignore("ignored due to NN-274")
3840
fun departure_banner_and_voice_instructions() = sdkTest {
3941
val testRoutes = testRoute().toNavigationRoutes()
4042
val mapboxNavigation = MapboxNavigationProvider.create(

0 commit comments

Comments
 (0)