mapbox-navigation-ios icon indicating copy to clipboard operation
mapbox-navigation-ios copied to clipboard

[Bug]: Multiple telemetry events for one action in CarPlay scenario.

Open S2Ler opened this issue 4 years ago • 1 comments

Mapbox Navigation SDK version

v2.0.0-rc.5

Steps to reproduce

  1. Start Example app with CarPlay
  2. Observe events:
  • sendPassiveNavigationStart
  • sendPassiveNavigationStop

Expected behavior

Only one of this event per action is reported.

Actual behavior

Two events are reported per one action.

Root cause

CarPlay controller instantiates its own PassiveLocationManager and there are two of them in total in a Car Play use case. It causes the events above to be called twice: one from the main app and one from the CarPlay.

Is this a one-time issue or a repeatable issue?

repeatable

S2Ler avatar Oct 14 '21 12:10 S2Ler

Creating two instances of PassiveLocationManager for different platforms is not necessarily one action and I guess it'd be beneficial to keep track of every PassiveLocationManager creation/deletion, as it can be done ad-hoc by user on iOS. It might be also be pretty tricky to keep track of previously sent events during CarPlay head-unit connection/disconnection/independent work.

I think that we should keep existing event sending logic without any changes, but add information regarding platform in NavigationEventsManager.userInfo.

MaximAlien avatar Nov 23 '21 23:11 MaximAlien