//Above android 12
Button(onClick = {
val intent = Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE)
activityResultLauncher.launch(intent)
}) {
Text(text = "Enable")
}
This code helps me to enable bluetooth in Android 13+, but I don’t know how to disable it
I have seen a REQUEST_DISABLE method and I tried this , but this is a private method so it doesn’t work
Button(onClick = { val intent = Intent(android.bluetooth.adapter.action.REQUEST_DISABLE) activityResultLauncher.launch(intent) }) { Text(text = "disable") }