-
Notifications
You must be signed in to change notification settings - Fork 116
Location tracking issues Android 12 #730
Description
In our Android app, the location tracking is not working as expected and it seems that only Android 12 devices are affected.
We are using Mapbox Android SDK 9.7.2 in our production app and we followed this guide to retrieve location updates and to update the location marker position: https://docs.mapbox.com/android/core/guides/#requesting-location-updates
This is our experience:
- when starting the location tracking, the location puck is shown at a different position (about 300m away, off a pedestrian path or road, ...)
- the location puck has gray color right after the tracking has started, which indicates that the app did not receive any location updates
- while moving outside, the the LocationEngineCallback always returns the same location (sometime it never changes, sometimes it changes suddenly after 3 minutes while walking outside) -> so the location marker does not change its position on the map
- I do not see any warnings or exceptions in Logcat
- when running Google Maps on the same device (it is a Google Pixel 3a) and track the location, everything works as expected so it is not a connectivity issue
- when the same device was running Android 11 some months ago, those problems did not occur
We do not have multiple devices with Android 12 for testing, only the Google Pixel 3a. But we have a second device with Android 11 and those problems do not occur there, so this device acts the same way as the Pixel 3a did when there was Android 11 running.
I tried running the latest Sample App using the Mapbox v9 sdk from https://github.com/mapbox/mapbox-gl-native-android/tree/main/MapboxGLAndroidSDKTestApp and the location is also not correctly updated there.
One difference to our production app: the location puck is blue, indicating that the location updates are correctly received, but the puck still does not move and the Toast shows the exact same coordinates all the time while walking, going by car or tram.
Is there anything that I am missing? Is it a bug in the v9 sdk? I am thankful for ANY advice.
I know there is already v10 outside, but we have no time at the moment to migrate and according to the Readme of this repo, v9 should be still supported so I hope that I can get some help here.
