mapbox-navigation-android
mapbox-navigation-android copied to clipboard
NN Reroute Controller
Description
Native reroute controller
Changes
- Removed:
-
MapboxRerouteController
.
-
- Added:
-
MapboxRerouteControllerFacade
wraps nativeRerouteControllerInterface
to use via platform; -
NativeRerouteControllerWrapper
extend nativeRerouteControllerInterface
and extend it with platform's required API:setRerouteCallbackListener
,setRerouteOptionsAdapter
; -
RerouteControllerAdapter
adapts customer'sNavigationRerouteController
to native implementation; -
RerouteControllersManager
handles what set of sdk's and native reroute controllers can work together. For instance, when the default native reroute controller is running it must work together with the internal platform reroute controller.
-
- Added
RerouteActivity
to qa-app module.- 2 modes: simulate and not;
- 3 types of reroute controllers: internal(default), external(property works for simulate work only), and disabled.
Codecov Report
Merging #6131 (9bc938b) into main (14b8460) will decrease coverage by
0.01%
. The diff coverage isn/a
.
:exclamation: Current head 9bc938b differs from pull request most recent head 90e7a1f. Consider uploading reports for the commit 90e7a1f to get more accurate results
@@ Coverage Diff @@
## main #6131 +/- ##
============================================
- Coverage 68.86% 68.85% -0.02%
+ Complexity 4521 4453 -68
============================================
Files 683 668 -15
Lines 27068 26690 -378
Branches 3171 3147 -24
============================================
- Hits 18641 18378 -263
+ Misses 7208 7104 -104
+ Partials 1219 1208 -11
Impacted Files | Coverage Δ | |
---|---|---|
...om/mapbox/navigation/dropin/NavigationViewModel.kt | 0.00% <0.00%> (-69.24%) |
:arrow_down: |
...ternal/extensions/NavigationViewContextFlowable.kt | 0.00% <0.00%> (-62.50%) |
:arrow_down: |
...app/internal/controller/LocationStateController.kt | 65.21% <0.00%> (-20.50%) |
:arrow_down: |
.../navigation/ui/maneuver/view/MapboxManeuverView.kt | 62.85% <0.00%> (-13.02%) |
:arrow_down: |
.../ui/maneuver/view/MapboxUpcomingManeuverAdapter.kt | 68.29% <0.00%> (-12.09%) |
:arrow_down: |
.../mapbox/navigation/dropin/NavigationViewContext.kt | 54.05% <0.00%> (-9.11%) |
:arrow_down: |
...igation/dropin/component/camera/CameraComponent.kt | 82.30% <0.00%> (-4.07%) |
:arrow_down: |
...n/ui/maps/internal/ui/CameraModeButtonComponent.kt | 63.63% <0.00%> (-3.04%) |
:arrow_down: |
...ion/ui/maps/internal/ui/RecenterButtonComponent.kt | 81.81% <0.00%> (-1.52%) |
:arrow_down: |
...gation/ui/maps/building/view/MapboxBuildingView.kt | 63.33% <0.00%> (-1.19%) |
:arrow_down: |
... and 72 more |
Just a note to check if native reroute controller supports recently introduced logic: https://github.com/mapbox/mapbox-navigation-android/pull/6164
Just a note to check if native reroute controller supports recently introduced logic: #6164
@DenisPryt could you have a look
I noticed, that moving logic from platform implementation to native implementation increased size of platform solution by ~4k lines of code. Did we expect that reusing some logic between platforms can make SDK more complex? 🤔 cc @mapbox/navigation-android
I noticed, that moving logic from platform implementation to native implementation increased size of platform solution by ~4k lines of code. Did we expect that reusing some logic between platforms can make SDK more complex? 🤔 cc @mapbox/navigation-android
I see that at least 4000 of added lines in this PR are JSON files, which are used for testing.
@DenisPryt , where do you create Directions API request for getting a new route from Directions API? Is that RerouteDetectorWorker::makeRerouteRequestUri
?
If so, I noticed some difference in added parameters between NN implementation(which adjust only waypoints and avoid dangerous manoeuvre parameter) and Android route options updater which adjust more parameters. Did I miss something or there are some missed cases in NN?
The PR was declined, because of Nav SDK v3, where the API will be refactored