Skip to content

Conversation

dzinad
Copy link
Contributor

@dzinad dzinad commented Jan 24, 2023

No description provided.

@github-actions
Copy link

github-actions bot commented Jan 24, 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)
  • 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

Comment on lines -20 to 23
internal val mapsPredictiveCacheLocationOptions =
mutableMapOf<Any, Triple<TilesetDescriptor, TileStore, PredictiveCacheLocationOptions>>()
internal val mapsPredictiveCacheLocationOptions = mutableMapOf<Any,
Pair<TileStore, List<Pair<TilesetDescriptor, PredictiveCacheLocationOptions>>>>()
internal val mapsPredictiveCacheLocationOptionsTileVariant =
mutableMapOf<Any, MutableMap<String, Pair<TileStore, PredictiveCacheLocationOptions>>>()
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm thinking if we need to store TileStore here at all.
We use it to recreate controllers, but TileStore should be the same instance across all calls createMapsController. We can save it as a PredictiveCache::tileStore on initial call and use for recreations

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should it? As far as I understand, for different MapboxMaps there can be different TIleStores. That's how we obtain TileStore:

val tileStore = map.getResourceOptions().tileStore

Copy link
Contributor

Choose a reason for hiding this comment

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

tileStore instance should be built on a customer side and the instance should be passed to Maps, NN, Search, so all SDKs will work with the same offline folder
val tileStore = TileStore.create(context.provideTileStorePath())
according to the docs

Creates a TileStore instance for the given storage path. The returned instance exists as long as it is retained by the client. If the tile store instance already exists for the given path this method will return it without creating a new instance, thus making sure that there is only one tile store instance for a path at a time. If the given path is empty, the tile store at the default location is returned. 

that's why I think we shouldn't store it for each MapboxMap

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But can't the user use different paths for different MapboxMaps?

Copy link
Contributor

Choose a reason for hiding this comment

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

what for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know, all I'm saying is that it's possible, so should we artificially remove this possibility? Especially considering the fact that it was possible previously.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Anyway, I think we can follow-up separately as this PR did not change this behaviour, right?

@codecov
Copy link

codecov bot commented Jan 26, 2023

Codecov Report

Merging #6868 (707889d) into main (687f6ba) will decrease coverage by 0.10%.
The diff coverage is 100.00%.

❗ Current head 707889d differs from pull request most recent head b4dc5b1. Consider uploading reports for the commit b4dc5b1 to get more accurate results

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #6868      +/-   ##
============================================
- Coverage     72.85%   72.76%   -0.10%     
+ Complexity     5657     5579      -78     
============================================
  Files           786      783       -3     
  Lines         30434    30192     -242     
  Branches       3607     3570      -37     
============================================
- Hits          22172    21968     -204     
+ Misses         6831     6798      -33     
+ Partials       1431     1426       -5     
Impacted Files Coverage Δ
.../navigation/base/options/PredictiveCacheOptions.kt 94.59% <100.00%> (+1.73%) ⬆️
...mapbox/navigation/core/internal/PredictiveCache.kt 92.30% <100.00%> (+21.78%) ⬆️
...ox/navigation/ui/maps/PredictiveCacheController.kt 74.37% <100.00%> (+0.16%) ⬆️
.../mapbox/navigation/ui/voice/api/MapboxSpeechApi.kt 87.23% <0.00%> (-6.89%) ⬇️
...ox/navigation/ui/voice/model/SpeechAnnouncement.kt 90.62% <0.00%> (-6.25%) ⬇️
...ox/navigation/ui/voice/api/MapboxSpeechProvider.kt 81.57% <0.00%> (-4.47%) ⬇️
...ox/navigation/base/internal/factory/RoadFactory.kt 70.00% <0.00%> (-2.73%) ⬇️
...ion/core/replay/route/ReplayRouteSessionOptions.kt 95.45% <0.00%> (-2.28%) ⬇️
...box/navigation/ui/voice/api/MapboxAudioGuidance.kt 84.74% <0.00%> (-1.70%) ⬇️
...igation/core/replay/history/ReplayHistoryMapper.kt 89.18% <0.00%> (-1.36%) ⬇️
... and 22 more

@dzinad dzinad requested a review from korshaknn February 1, 2023 10:55
@dzinad dzinad force-pushed the NAVAND-960-dd branch 2 times, most recently from 4f70849 to 97b2840 Compare February 2, 2023 11:15
@dzinad dzinad enabled auto-merge (rebase) February 2, 2023 11:16
@dzinad dzinad merged commit f90a47b into main Feb 2, 2023
@dzinad dzinad deleted the NAVAND-960-dd branch February 2, 2023 11:55
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.

3 participants