Repository navigation
Add telem current location engine being used track support - #382
Guardiola31337 wants to merge 3 commits into
Conversation
…rrent location engine being used
|
@Guardiola31337 |
|
@danesfeder we could add a field in the |
|
@Guardiola31337 I added a field in |
| (int) routeProgress.durationRemaining(), sessionState.startTimestamp() | ||
| )); | ||
| ); | ||
| Timber.d("Depart Location Engine name: " + sessionState.locationEngineName()); |
There was a problem hiding this comment.
Can we remove all the logging and remove the Hashtable<String, Object> departEvent returning it back to the original?
| .previousRouteDistancesCompleted(0) | ||
| .startTimestamp(new Date()) | ||
| .rerouteCount(0) | ||
| .locationEngineName(locationEngine.getClass().getSimpleName()) |
There was a problem hiding this comment.
Be careful because this is executed before setLocationEngine so it always has the original value (LostLocationEngine).
There was a problem hiding this comment.
Maybe adding it to the SessionState is not the best option.
| if (isServiceAvailable()) { | ||
| navigationService.acquireLocationEngine(); | ||
| // Update location engine name in the session state | ||
| sessionState.toBuilder().locationEngineName(locationEngine.getClass().getSimpleName()); |
There was a problem hiding this comment.
This is currently doing nothing. the line needs to say:
sessionState = sessionState.toBuilder().locationEngineName(locationEngine.getClass().getSimpleName()).build();| if (isServiceAvailable()) { | ||
| navigationService.acquireLocationEngine(); | ||
| // Update location engine name in the session state | ||
| sessionState.toBuilder().locationEngineName(locationEngine.getClass().getSimpleName()); |
There was a problem hiding this comment.
Be careful because this not always executed.
BTW, we're not doing anything here.
Even if we do sessionState = sessionState.toBuilder().locationEngineName(locationEngine.getClass().getSimpleName()).build(); it won't work because 👉 https://github.com/mapbox/mapbox-navigation-android/pull/382/files#r144950030 and because we'll need to recreate the whole .sessionState adding each value to the different parameters (toBuilder() doesn't return the current values from the object 😞)
c893437 addressed ☝️ |
…ts builder methods
4b8ba80 to
c893437
Compare
| Timber.v("Arrived event occurred"); | ||
| sessionState = sessionState.toBuilder().arrivalTimestamp(new Date()).build(); | ||
| NavigationMetricsWrapper.arriveEvent(sessionState, routeProgress, location); | ||
| NavigationMetricsWrapper.arriveEvent(sessionState, routeProgress, location, locationEngineName); |
There was a problem hiding this comment.
@cammace would it make sense to move the arrive event to NavigationService like the rest of the events? That way most of the current changes to this class could be self contained within NavigationService. @Guardiola31337
There was a problem hiding this comment.
Don't immediately see any issue with moving the entire onProgressChange into NavigationService` to keep all the events in the same class. Though I think whichever path we take, we should only have 1 internal onProgressChange to keep things simple. Let's do this in a different PR and go ahead and merge this one?
There was a problem hiding this comment.
@cammace @ericrwolfe
Follow up ticket 👉 #402
|
Had trouble resolving the conflicts from |
NavigationMetricsWrapperbuilder methods so that include the current location engine being usedIn order to merge this PR mapbox/mapbox-java#605 needs to get merged first.
TODO
NavigationMetricsWrapperbuilder methods (now there is a"placeholder") @cammace @danesfedermapboxServicesversion when https://github.com/mapbox/mapbox-java/pull/605 gets merged👀 @zugaldia @cammace @electrostat @ericrwolfe