I have developed a tracking app which allows me to track and record walks, bike rides and car trips. It uses LocationManager (NOT FusedLocationProvider) to get GPS locations along the way, and stores them away to a database. This has been working fine on a Motorola g31 phone running Android 11. I recently upgraded the phone to Android 12, and now the app is behaving somewhat differently. When tracking walks I have been getting very poor-quality location data, which is making the app almost useless for its intended purpose. Strangely, when tracking drives in the car the data seems to be fine. The only significant difference between the two is the location update interval: for walks it is 10 seconds, for drives 5 seconds.
I recently did a short test drive and tracked it, and the results were perfectly fine (I can view the tracks on a Google Map). So I immediately did a short walk, and again saw the poor-quality location data mentioned above - hardly any points on the actual path walked, and the total distance quite different from what it should be. So I changed the location update interval for walks to be 5 seconds instead of 10, and did the same walk again. To my amazement, the data was fine! All points on or very close to the walked track. So, what is going on here? This worked perfectly OK on Android 11, but now this.
I get the strong feeling that Android 12 is providing only "coarse" locations when the interval is 10 seconds, but I have not been able to find anything to confirm that. And if it is the case I don't know what I would be able to do to get around it, without perhaps going to the FusedLocationProvider, which I would prefer not to do. Yes I know the older LocationManager is deprecated, but in general it works fine and I don't like the fact that the FusedLocationProvider is part of Google Play Services, and will therefore probably be collecting my location data for whatever use Google might want to put it to. I know people will ask me to post code, but this is a general question regarding Android 11 vs Android 12 - can it be answered in that context?