Users in the field are reporting random problems with GPS location in an app. The app has been using LocationManager for about 12 years with little modification.
I was able to see some unpredictable behavior by testing on Pixel 3 with Android 12. The behavior includes location being off by half a mile, and not updating regularly unless some other app uses GPS.
Are there some things that are different about location manager in Android 11/12? If so where are they documented? The code I have has worked fine since Android 1.5.
I am using it through a library, but decompiling gave me this call:
mLocationManager.requestLocationUpdates("gps", 250, 1, listener);
I changed it to
mLocationManager.requestLocationUpdates("gps", 100, 0, listener);
It worked for a bit and then stopped working again. The updates don't come in.
Does it need background location even though the documentation says I SHOULDN'T need background location to use location in an activity or foreground service?
If not, what the heck is going on?