Open korshaknn opened 3 years ago
cc @Udumft @LukasPaczos @Guardiola31337 @1ec5 @zugaldia @truburt @RingerJK
If we are suggesting tile expiration API we should mention that it should cover cases when we are checking expiration for tiles, which are not added to the TileStore. Approach above does not understand if there are no Nav tiles at all, and will report 'tiles expired' instead.
Current iOS implementation could be found here.
@Udumft yep, android impl was not tested (and can't be tested on android) and might have bugs. As you see there might be some edge cases and we should handle all of them on each platform, or move logic to the common.
What about NN? It seems that this logic requires information that NN has. Shouldn't be NN the one handling / implementing this instead of common
? What do you think @mskurydin @etl?
cc @kkaefer
checkAllRegionsTilesExpired
I recommend against using the word “expired” for this. Those tiles aren’t expired. What you’re checking here is whether there’s a new version available for Navigation tiles in that region.
I also agree that this isn’t logic that should be implemented on the SDK level since it’s identical across platforms.
I also agree that it seems more logical to implement these checks in the native code. However, Navigator might be not the best place for it architecturally either. All it needs is the configured tile store (which we get from above on creation).
@mskurydin @kkaefer IIRC this was going going to be ultimately implemented in common
/ NN, could you please clarify what version is going to include the fix? 🙏
@kkaefer @mskurydin hey! where are we here? has it been added to common/nn?
There’s nothing that moved here.
has it been added to common/nn?
I don’t think we have a good idea of what to add to common.
We need provide some extensions to make such checks easier
Why? It’s not obvious to me that such a method would be good or useful. Before adding more API to Common, we should probably figure out how many helper methods we want to provide in the SDK, and what their intended use case is.
@kkaefer it's a common use-case to check if there is a new version of nav tiles (for a list of tile regions or a single one).
and as you said
I also agree that this isn’t logic that should be implemented on the SDK level since it’s identical across platforms.
yes, it's identical, so it would be better to add it to a single place: common/NN.
TileStore
has a methodtileRegionContainsDescriptors(...)
which can be used by a customer to check single regions expiration. We need provide some extensions to make such checks easier It might be:and for a single region
but in that case on android we can't cover it with unit tests,
TileStore
is a c++ class, it's methods can't be mocked without an additional dependency likePowerMockito
.also such methods should be implemented on each platform and we might get additional bugs.
Example (iOS has pretty close logic):
Should we ask
common
team to expose such API?Common
should receivedescriptors
to make a check, soit's a little confusing that platforms need to write the same extensions. It means that base API is not enough and it should be improved, doesn't it?