-
Notifications
You must be signed in to change notification settings - Fork 153
Description
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
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
- The accumulation of internal cache in SDK leads to continuous return of historical latitude and longitude
- SDK does not automatically switch location providers internally
- Kill process re-entry, SDK failed to request new latitude and longitude again
