react-native-bluetooth-state-manager icon indicating copy to clipboard operation
react-native-bluetooth-state-manager copied to clipboard

BluetoothStateManager.enabled() on android 12 are unable to turn on the bluetooth peripheral

Open mhendyl opened this issue 3 years ago • 4 comments

BluetoothStateManager.enabled() is working fine on android 11 but when try with android 12 the BluetoothStateManager are unable to turn on the bluetooth peripheral

mhendyl avatar Aug 25 '22 07:08 mhendyl

@mhendyl you need request BLUETOOTH_SCAN permission first

khoale-groove avatar Sep 29 '22 07:09 khoale-groove

enable / disable is only working Android < 12, the issue is not about permission

x7Michi10x avatar Nov 30 '22 20:11 x7Michi10x

Hi @mhendyl @x7Michi10x , were you able to fix this issue in Android 12? I'm running into it too, I tried adding BLUETOOTH_SCAN as @khoale-groove mentioned but it does not work, thanks in advance.

oalcantarhypha avatar Mar 21 '23 15:03 oalcantarhypha

Hi @mhendyl @x7Michi10x , were you able to fix this issue in Android 12? I'm running into it too, I tried adding BLUETOOTH_SCAN as @khoale-groove mentioned but it does not work, thanks in advance.

Yes, I did by adding maxSdkVersion and targetApi.

x7Michi10x avatar Mar 21 '23 17:03 x7Michi10x