Skip to content

Conversation

kmadsen
Copy link
Contributor

@kmadsen kmadsen commented Jan 9, 2023

Description

https://mapbox.atlassian.net/browse/NAVAND-652

Right now it is difficult to enable/disable replay with AA and DropInUi because the two systems have different lifecycles. For example, DropInUi can be started and it will start replay with the TripSessionComponent. When DropInUi is closed, it will detach the TripSessionComponent. Considering that, the car head unit is expected to work when the mobile app is closed - it is expected that the car head unit can continue to use a replay session created by the mobile app. We don't have a solution solution for this yet.

The issue is being resolved by this pull request. With the new MapboxTripStarter used by DropInUi, after an SDK release we can use the MapboxTripStarter in the android-auto-app and the instance will be shared between the two systems. It will not matter if the car or app was launched first. This will also give us the ability to control the replay state from the car or app.

@kmadsen kmadsen force-pushed the km-NAVAND-652-trip-starter branch from 0346529 to 2071fe8 Compare January 9, 2023 23:42
@kmadsen kmadsen marked this pull request as ready for review January 10, 2023 01:46
@github-actions github-actions bot requested review from dzinad and SevaZhukov January 10, 2023 01:46
@codecov
Copy link

codecov bot commented Jan 10, 2023

Codecov Report

Merging #6794 (0300a78) into main (4ea8475) will decrease coverage by 0.03%.
The diff coverage is 86.07%.

❗ Current head 0300a78 differs from pull request most recent head 8d027f7. Consider uploading reports for the commit 8d027f7 to get more accurate results

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #6794      +/-   ##
============================================
- Coverage     72.65%   72.63%   -0.03%     
- Complexity     5564     5567       +3     
============================================
  Files           781      780       -1     
  Lines         30132    30115      -17     
  Branches       3565     3561       -4     
============================================
- Hits          21893    21873      -20     
- Misses         6810     6817       +7     
+ Partials       1429     1425       -4     
Impacted Files Coverage Δ
...ava/com/mapbox/navigation/core/MapboxNavigation.kt 70.90% <0.00%> (-0.11%) ⬇️
...com/mapbox/navigation/ui/app/internal/SharedApp.kt 0.00% <0.00%> (ø)
...ava/com/mapbox/navigation/ui/app/internal/State.kt 100.00% <ø> (ø)
...ava/com/mapbox/navigation/dropin/NavigationView.kt 97.26% <ø> (-0.04%) ⬇️
...pin/internal/extensions/NavigationViewContextEx.kt 93.16% <ø> (-0.06%) ⬇️
...n/dropin/navigationview/MapboxNavigationViewApi.kt 91.35% <0.00%> (-1.24%) ⬇️
...n/dropin/permission/LocationPermissionComponent.kt 67.30% <50.00%> (+0.03%) ⬆️
...m/mapbox/navigation/core/trip/MapboxTripStarter.kt 89.06% <89.06%> (ø)
...ion/core/trip/session/TripSessionLocationEngine.kt 82.97% <100.00%> (+1.16%) ⬆️
...ui/app/internal/controller/StateResetController.kt 100.00% <100.00%> (+5.26%) ⬆️
... and 6 more

@kmadsen
Copy link
Contributor Author

kmadsen commented Jan 10, 2023

I'm moving this one back to draft because there are issues that need to be resolved. I would also like to rebase on top of this one because that should simplify the issues #6817

EDIT: Ok this has been rebased, updated, and there's an example to test. It also fixes the DropInUi voice instruction orientation change issue. Please take a look at RoadObjectsActivity as an example.

@kmadsen kmadsen marked this pull request as draft January 10, 2023 23:22
@kmadsen kmadsen force-pushed the km-NAVAND-652-trip-starter branch from d624f7e to add2cd4 Compare January 11, 2023 22:45
@github-actions
Copy link

github-actions bot commented Jan 11, 2023

Changelog

Features

  • Added MapboxTripStarter to simplify the solution for managing the trip session and replaying routes. This also makes it possible to share the replay state between drop-in-ui and android-auto. #6794

Bug fixes and improvements

  • Removed NavigationRoute#hasUnexpectedClosures and added RouteProgress#hasUnexpectedUpcomingClosures instead that checks whether route has upcoming unexpected closures (the algorithm does not take into account closures that the puck has already been on) #6841
  • Improved NavigationView camera behavior to go back into overview state if routes change during route preview state. #6840

Known issues ⚠️

Other changes

Android Auto Changelog

Features

Bug fixes and improvements

@kmadsen kmadsen marked this pull request as ready for review January 12, 2023 00:11
@kmadsen kmadsen force-pushed the km-NAVAND-652-trip-starter branch from 11da227 to 74c3dcf Compare January 12, 2023 16:56
@kmadsen kmadsen force-pushed the km-NAVAND-652-trip-starter branch 4 times, most recently from d63c52f to 3b785e4 Compare January 13, 2023 19:32
@kmadsen kmadsen force-pushed the km-NAVAND-652-trip-starter branch 2 times, most recently from 64365df to 0300a78 Compare January 17, 2023 21:06
@kmadsen kmadsen force-pushed the km-NAVAND-652-trip-starter branch from 80c9abd to 8d027f7 Compare January 18, 2023 18:06
@kmadsen
Copy link
Contributor Author

kmadsen commented Jan 18, 2023

ev_route_refresh_updates_ev_annotations_and_waypoints_for_second_leg keeps failing which has been going on for months #6655 (comment)

@kmadsen kmadsen enabled auto-merge (squash) January 18, 2023 18:39
@kmadsen kmadsen merged commit bf322c0 into main Jan 18, 2023
@kmadsen kmadsen deleted the km-NAVAND-652-trip-starter branch January 18, 2023 18:49
@dzinad
Copy link
Contributor

dzinad commented Jan 19, 2023

ev_route_refresh_updates_ev_annotations_and_waypoints_for_second_leg keeps failing which has been going on for months #6655 (comment)

Oh, that's not good... I haven't seen it fail lately. But I don't think it's related to your PR, I'll look at the logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants