I am trying to use LocationManager.FUSED_PROVIDER, which according to Android Dev documentation was added in API level 31 (Android 12)
My minSdkVersion is 26 for my app
When I put down LocationManager.FUSED_PROVIDER, Android Studio does NOT complain about my minSdkVersion. Also - my test phone on Android 11 (which I presume is API level 30) runs the app (inclusive of the location functionality) without issue
Can someone please help me understand why Android 11 can run a function making use of the FUSED_PROVIDER despite that being added on in API level 31? Does this imply that phones running down to my minSdkVersion of 26 should be able to handle as well?
Edit:
I just ran the following code on an Android 9 device (spare device I flash downgraded) and the device was able to retrieve the location without error -- not sure how this is happening since Android 9 is API v28
mLocationManager.requestLocationUpdates(LocationManager.FUSED_PROVIDER, 0, 0, mLocationListener);
