Possible Duplicate:
How to enable/disable bluetooth programmatically in android
Hi I m developing an application in which Bluetooth has to be turned on programatically can you please tell me as to how to do that step by step thanks in advance
Possible Duplicate:
How to enable/disable bluetooth programmatically in android
Hi I m developing an application in which Bluetooth has to be turned on programatically can you please tell me as to how to do that step by step thanks in advance
This code works for me. You can try this
BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
if (!mBluetoothAdapter.isEnabled()) {
//Play with bluetooth
}else{
mBluetoothAdapter.disable();
}