Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ReplayRouteSession and TripSessionStarter handle route changes #6913

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kmadsen
Copy link
Contributor

@kmadsen kmadsen commented Jan 27, 2023

Description

Status: opening as a draft cause i just made it work and need to update the tests

There are a couple experiences we have found that need improvement with the ReplayRouteSession.

  1. Switching routes requires instantiating a new instance of ReplayRouteSession and calling resetTripSession
  2. Selecting a route during route preview should move the location to the origin of that route to prepare for replay route

This pull request is addressing 1. I haven't tested 2 much yet. But it works with Android Auto so I'm adding a video that demonstrates an improvement to the new junction view example. Now you can select routes and have the replayer reset to that location.

Screenshots or Gifs

better-replay-route-720p.mov

@github-actions
Copy link

github-actions bot commented Jan 27, 2023

Changelog

Features

  • Introduced PredictiveCacheOptions.Builder#predictiveCacheMapsOptionsList as an alternative for deprecated PredictiveCacheOptions.Builder#predictiveCacheMapsOptions. This allows to use different PredictiveCacheLocationOptions for different zoom level ranges. [#6868](https://github.com/mapbox/mapbox-navigation-android/pull/6868)

Bug fixes and improvements

  • Make the location switch to map matching faster with MapboxTripStarter.enableMapMatching [#6906](https://github.com/mapbox/mapbox-navigation-android/pull/6906)
  • Fixed an issue with NavigationView that caused left frame to overlap with maneuver view in landscape mode during active navigation. [#6914](https://github.com/mapbox/mapbox-navigation-android/pull/6914)
  • Make MapboxTripStarterType.ReplayRoute and ReplayRouteSession automatically move to the origin of the route after MapboxNavigation.setNavigationRoutes. [#6913](https://github.com/mapbox/mapbox-navigation-android/pull/6913)
  • Make ReplayRouteSession observe the ReplayRouteSessionOptions so changes can be made without creating a new instance of the session. [#6913](https://github.com/mapbox/mapbox-navigation-android/pull/6913)
  • Change ReplayRouteSession.getOptions() to return a StateFlow so the options can be observed. [#6913](https://github.com/mapbox/mapbox-navigation-android/pull/6913)
  • Introduced VoiceInstructionsPrefetcher MapboxSpeechAPI#generatePredownloaded to use predownloaded voice instructions instead of downloading them on demand. Example usage can be found in the examples directory ( see MapboxVoiceActivity). [#6771](https://github.com/mapbox/mapbox-navigation-android/pull/6771)
  • Enabled voice instructions predownloading for those who use MapboxAudioGuidance. [#6771](https://github.com/mapbox/mapbox-navigation-android/pull/6771)
  • Fixed an issue where with low connectivity voice instruction might have been played too late for those who use MapboxAudioGuidance. If you use MapboxSpeechAPI directly, switch to voice instructions predownloading as described above if you encounter said issue. [#6771](https://github.com/mapbox/mapbox-navigation-android/pull/6771)
  • Fixed rendering of 3 digit speed limit values in MapboxSpeedInfoView. [#6919](https://github.com/mapbox/mapbox-navigation-android/pull/6919)
  • Updated MapboxNavigationApp to ignore detach calls, if the LifecycleOwner wasn't attached first. [#6920](https://github.com/mapbox/mapbox-navigation-android/pull/6920)

Known issues ⚠️

Other changes

Android Auto Changelog

Features

Bug fixes and improvements

@kmadsen kmadsen force-pushed the km-improve-replay-route-session branch from cc70912 to 959b5ea Compare January 28, 2023 00:08
@kmadsen kmadsen force-pushed the km-improve-replay-route-session branch from 7fb60f8 to 942ea75 Compare February 2, 2023 18:40
implementation("com.mapbox.navigation:ui-dropin:2.10.0-rc.1")
implementation("com.mapbox.search:mapbox-search-android:1.0.0-beta.42")
implementation("com.mapbox.navigation:ui-dropin:2.10.0")
implementation("com.mapbox.search:mapbox-search-android:1.0.0-beta.43")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Android Auto uses 1.0.0-beta.44.

@@ -72,8 +72,8 @@ dependencies {
// This example is used for development so it may depend on unstable versions.
// Examples based on final versions can be found in the examples repository.
// https://github.com/mapbox/mapbox-navigation-android-examples
implementation("com.mapbox.navigation:ui-dropin:2.10.0-rc.1")
implementation("com.mapbox.search:mapbox-search-android:1.0.0-beta.42")
implementation("com.mapbox.navigation:ui-dropin:2.10.0")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to use 2.11.0 beta, otherwise it doesn't compile.

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

Successfully merging this pull request may close these issues.

2 participants