I am building an SDK API with beacons integration which requires Bluetooth scan permission for android 12 and above. So, I added annotation for the API like this:
@RequiresPermission(allOf = [Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.BLUETOOTH_SCAN])
fun enableBeaconScan()
When I add this, I am getting a warning:
Is there a way to restrict this permission only for the supported android versions and get rid of this warning?