I have written an app to turn on bluetooth using voice.(Just called the intent and used the Action.request.enable method). Its working fine..
Now I want to turn off bluetooth. I tried using bluetoothadapter.disable() but the whole application crashes. Please help me.. This is my code
BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
if(mBluetoothAdapter.isEnabled())
{
mBluetoothAdapter.disable();
}