Code example for BluetoothAdapter

Methods: enable

0
 
    void setBluetooth(boolean aEnable) {
        if (mBt == null) return;
 
        if (aEnable == true) {
            mBt.enable();
        } else { 
            mBt.disable();
        } 
    } 
 
    boolean getBluetooth() { 
        if (mBt == null) return false;
 
        return mBt.isEnabled();
    } 
}