Code example for BluetoothAdapter

Methods: isEnabled

0
            if (BluetoothAdapter.STATE_OFF == newState) {
                mDisablingDialog.hide();
                mToggleButton.setEnabled(true);
            } 
 
            mToggleButton.setChecked(mBluetoothAdapter.isEnabled());
            getPassButton().setEnabled(mNumDisabledTimes > 0 &&  mNumEnabledTimes > 0);
        } 
    } 
 
    @Override 
    protected void onDestroy() { 
        super.onDestroy(); 
        unregisterReceiver(mReceiver);
    } 
}