After changing my targetSdk
to 32, I get the following error:
Settings key: <bluetooth_address> is only readable to apps with targetSdkVersion lower than or equal to: 31
I think this is happening while checking permissions while loading my app.
After changing my targetSdk
to 32, I get the following error:
Settings key: <bluetooth_address> is only readable to apps with targetSdkVersion lower than or equal to: 31
I think this is happening while checking permissions while loading my app.
Issue is due to few parameters are annotated with maxTargetSdk = Build.VERSION_CODES.S enter image description here
For bluetooth_name I found the alternative and reading device_name using below code:
Settings.Global.getString(application.contentResolver, Settings.Global.DEVICE_NAME)
?: "UNKNOWN"
I solved this for me by downgrading the gradle version to 7.0.4 and setting both the compileSdkVersion and the targetSdkVersion to 31.
Unfortunately it's not the fix that i wanted but this is an intermediate step for now to continue working