mapbox / mapbox/mapbox-navigation-android
Free Drive START events have always null location
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Kotlin
- Sterne
- 651
- Forks
- 321
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Follow up ticket from https://github.com/mapbox/mapbox-navigation-android/pull/3791#issuecomment-729733263
From my tests
STARTevents never havelocation(is alwaysnull) 😞We should check when the
locationsCollectorobserver is registered because maybe trip session doesn't provide a location until the session is started but when it is started we immediately send event. The issue may be fixed if we do it after registering 🤔cc @korshaknn
2020-11-18 11:29:20.995 25573-25573/com.mapbox.navigation.examples D/MAPBOX_TELEMETRY: Valid initialization 2020-11-18 11:29:43.459 25573-25573/com.mapbox.navigation.examples D/MAPBOX_TELEMETRY: session state is FREE_DRIVE 2020-11-18 11:29:43.459 25573-25573/com.mapbox.navigation.examples D/MAPBOX_TELEMETRY: sessionStop 2020-11-18 11:29:43.459 25573-25573/com.mapbox.navigation.examples D/MAPBOX_TELEMETRY: resetOriginalRoute 2020-11-18 11:29:43.459 25573-25573/com.mapbox.navigation.examples D/MAPBOX_TELEMETRY: resetRouteProgress 2020-11-18 11:29:43.459 25573-25573/com.mapbox.navigation.examples D/MAPBOX_TELEMETRY: trackFreeDrive START 2020-11-18 11:29:43.460 25573-25573/com.mapbox.navigation.examples D/MAPBOX_TELEMETRY: createFreeDriveEvent START 2020-11-18 11:29:43.476 25573-25573/com.mapbox.navigation.examples D/MAPBOX_TELEMETRY: populateFreeDriveEvent 2020-11-18 11:29:43.477 25573-25573/com.mapbox.navigation.examples D/MAPBOX_TELEMETRY: class com.mapbox.navigation.core.telemetry.events.NavigationFreeDriveEvent event sent 2020-11-18 11:29:43.504 25573-25573/com.mapbox.navigation.examples D/MAPBOX_TELEMETRY: Lifecycle monitor created 2020-11-18 11:29:43.509 25573-25573/com.mapbox.navigation.examples D/MAPBOX_TELEMETRY: onRawLocationChanged
onRawLocationis received afteronNavigationSessionStateChangedwhen the event has been already sent.
override fun start() { if (state == TripSessionState.STARTED) { return } tripService.startService() startLocationUpdates() state = TripSessionState.STARTED }
startLocationUpdatesis async andstateexecutes theonSessionStateChangedright away beforeonRawLocationChanged.We should investigate a different way to wait for the first location https://github.com/mapbox/mapbox-navigation-android/pull/3751#discussion_r521379048 and also discuss what to do if a session is started and no locations are received. Refs. https://github.com/mapbox/mapbox-navigation-android/issues/2827
cc @korshaknn @kmadsen @LukasPaczos
cc @korshaknn @kmadsen @LukasPaczos
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit dem start()-Ablauf von TripSession, insbesondere mit startLocationUpdates(), und verfolge, wann onNavigationSessionStateChanged und onRawLocationChanged zugestellt werden. Reproduziere ein FREE_DRIVE START-Ereignis und überprüfe, ob der erste Standort eintrifft, nachdem das Ereignis gesendet wurde. Als abgeschlossen gilt die Aufgabe, wenn entschieden und getestet wurde, wie START mit dem ersten Standort umgeht, einschließlich des Falls, dass kein Standort empfangen wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- kotlin
- Bereich
- mobile
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100