Android Question With no BT adapter: If admin_BT.Enable = False Then

swChef

Active Member
Licensed User
Longtime User
Erel, on a Kindle Fire which does not have a BT adapter, with the following conditional
If admin_BT.Enable = False Then
xxx
Else
yyy
the software goes to the Else clause. I would expect without a BT an attempt to enable would be rejected, meaning it would = False, and take the Then clause.

?
 

aarondc

Member
Licensed User
Longtime User
If you are writing B4A software that can utilise BT if it is there, but does not require it to operate, detecting BT or not is a very useful thing. I am very keen to see what Erel suggests as a solution.

The Android Bluetooth page suggests the following snippet:

B4X:
BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
if (mBluetoothAdapter == null) {
    // Device does not support Bluetooth
}

But I could not see an equivalent member of the BTAdmin class.
 
Upvote 0
Top