Skip to content

Entering the tunnel and then exiting, unable to obtain the latest positioning information, the current location icon on the map will no longer update its position #2692

@Ag1392005448-stack

Description

@Ag1392005448-stack

Environment

  • Android OS version:Android 14
  • Devices affected:Most mobile phones
  • Maps SDK Version: com.mapbox.maps:android-ndk27:11.16.6,com.mapbox.navigationcore:android-ndk27:3.17.0-rc.3

Observed behavior and steps to reproduce

1、Use the demo to obtain the current user location data. The app is always in the foreground. After entering the tunnel for more than ten minutes, the latitude and longitude returned by the "onNewPositionMatcherResult" method are always the latitude and longitude before entering the tunnel. The killing process will not update the latitude and longitude again

2、Our self-developed app uses mapboxNavigation. startTripSession() to start positioning, obtain the current location, exit to the background, enter the tunnel for more than ten minutes, and exit the tunnel. The "onNewPositionMatcherResult" method always returns the latitude and longitude before entering the tunnel, and the puck stops at the position when exiting to the background, not the current position. Killing the process will not update latitude and longitude again

Image

Expected behavior

1、Start positioning through "mapboxNavigation. startTripSession()" and return latitude and longitude through "onNewLayoutMatcherResult" in "PositionObserver"
2、Configuration:MapboxNavigationApp.setup(
NavigationOptions.Builder(context).locationOptions(
LocationOptions.Builder().request(
LocationProviderRequest.Builder().interval(
IntervalSettings.Builder().interval(3000L).minimumInterval(3000L).maximumInterval(3000L).build()
).accuracy(AccuracyLevel.HIGHEST).displacement(10F).build()
).build()
).build()
)

Notes / preliminary analysis

  1. The accumulation of internal cache in SDK leads to continuous return of historical latitude and longitude
  2. SDK does not automatically switch location providers internally
  3. Kill process re-entry, SDK failed to request new latitude and longitude again

Additional links and references

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🪲Something isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions