dpa99c / cordova-diagnostic-plugin

Cordova/Phonegap plugin to manage device settings
539 stars 361 forks source link

getBluetoothState() returns OK in SDK 33 even though bluetooth is not enabled/disabled #496

Closed mdivya-symplr closed 1 year ago

mdivya-symplr commented 1 year ago

Bluetooth is not enabled/ disabled when getBluetoothState is called in Android 13 but still returns success response

Starting with Build.VERSION_CODES.TIRAMISU, applications are not allowed to enable/disable Bluetooth. https://developer.android.com/reference/android/bluetooth/BluetoothAdapter#enable()

dpa99c commented 1 year ago

Regression tested with the example project with build SDK = API 33: getBluetoothState() returns the correct result however setBluetoothState() has now effect because changing Bluetooth state on API 33+ is not supported.