Conversation
7d8a8a7 to
c885a2f
Compare
|
not sure about the changelog, do we need it? |
c885a2f to
184cd4e
Compare
We have a separate file in libnavui-androidauto/CHANGELOG.md, could you move the note there? |
184cd4e to
7925958
Compare
Codecov Report
@@ Coverage Diff @@
## main #5825 +/- ##
=========================================
Coverage 67.63% 67.63%
Complexity 3829 3829
=========================================
Files 586 586
Lines 23583 23583
Branches 2715 2715
=========================================
Hits 15951 15951
Misses 6614 6614
Partials 1018 1018 |
7925958 to
5fb1c2b
Compare
| } | ||
|
|
||
| init { | ||
| MapboxNavigationApp.registerObserver(this) |
There was a problem hiding this comment.
Is this the fix to convert the underlying flowables into hot flowable? Meaning, they stay subscribed even after the top level is unsubscribed.
This also means that the MapboxAudioGuidance observer cannot be unsubscribed entirely. The developer would have no way to unregister this class besides the MapboxNavigationApp lifecycle ending
There was a problem hiding this comment.
MapboxNavigationApp.unregisterObserver(mapboxAudioGuidance) should also unregister all of the observers it is responsible for.
There was a problem hiding this comment.
I've considered this issue before but haven't added support for it. I'd like to make it difficult to create leaking subscriptions with MapboxNavigationApp #5829
With 5829, we could turn MapboxVoiceInstructions into an object and make it so it is the only subscriber. In case there are too many issues trying to unregister MapboxNavigation when MapboxNavigationApp.unregisterObserver(mapboxAudioGuidance) is called.
Side note, yeah this is happening. We're consolidating 1tap, drop-in-ui, and android-auto implementations for audio guidance. Essentially, all examples will use the same implementation. Right now it is in transition, sorry the qa-test-app support at the moment is lacking. |
kmadsen
left a comment
There was a problem hiding this comment.
https://github.com/mapbox/mapbox-navigation-android/pull/5825/files#r876477888
Sorry it is a confusing because MapboxCarApp controls a single subscription by subscribing and never unsubscribing from MapboxAudioGuidance (at the moment).
MapboxAudioGuidance is not actually a singleton. Doing something like this should not leak subscriptions.
audioGuidance: MapboxAudioGuidance = MapboxAudioGuidanceImpl(...)
MapboxNavigationApp.registerObserver(audioGuidance)
MapboxNavigationApp.unregisterObserver(audioGuidance)
audioGuidance: MapboxAudioGuidance = MapboxAudioGuidanceImpl(...)
MapboxNavigationApp.registerObserver(audioGuidance)
MapboxNavigationApp.unregisterObserver(audioGuidance)
|
@kmadsen thanks for the feedback!
yes, we need it because with cold flows we miss the first instruction.
fixed with also |
3a78af2 to
22417e2
Compare
Description
This PR fixes an issue when the first instruction is not played.
It's related to
libnavui-androidautomodule only and can be tested with 1Tap.Also it might be useful to have some activity (or a separate test app?) in
examplesto testlibnavui-androidautomodule.issue details:
changes:
routes,instructions,tripSessionStateonattach/detachMapboxAudioGuidanceServicesImpl