How can I replicate location permission request error in Android 12

Viewed 463

According to Google's documentation re. Android 12, you have to make some permission request changes (again...) if targetting 31, mentioned here

More speficically:

Also, if your app targets Android 12 or higher, you can't request the ACCESS_FINE_LOCATION permission by itself. You must also request the ACCESS_COARSE_LOCATION permission, and you must include both permissions in a single runtime request. If you try to request only ACCESS_FINE_LOCATION, the system ignores the request and logs the following error message in Logcat:

ACCESS_FINE_LOCATION must be requested with ACCESS_COARSE_LOCATION.

However, i can't for the life of me replicate this. I target Android 12 in my manifest (targetSdkVersion 31), and i run it on the 12 Emulator, but i can request only FINE permission just as i always have, and I still get the permission - or coarse, based on what the user chooses, since that's new in 12. But nothing in the Logs, and no problems, my location code works like before.

Have they changed their stance? Is there some other documentation somewhere that i've missed?

Thoughts appreciated.

0 Answers
Related