'Android 12 Precise vs Approximate Location Permissions Dialog

Can anyone confirm consistency around the requesting UX for fine location permissions on Android 12?

Using EasyPermissions, when requesting Location for...

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
targetSdkVersion 30
compileSdkVersion 30

..we see one device use the new precise / approximate dialog, and another the legacy dialog. Only tangible difference is the Pixel 3 is on a slightly newer build of Android 12. For what it's worth, once compiling and targeting SDK 31, the two phones act consistently.

Related, but not noticed here, is an article describing variation for needing fine+coarse permissions on Android 12 - https://developer.android.com/training/location/permissions#approximate-request

Pixel 3a XL:

enter image description hereenter image description here

Pixel 3:

enter image description hereenter image description here



Solution 1:[1]

After some renewed digging, it seems Google just made a mistake. I haven't dug into OSS code, but on early versions of Android 12, Google must not be checking targetSdkVersion == 31 when determining to display the new dialog style.

Once I target SDK 31, both Pixel devices act the same and use the new dialog style.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Kevin