Android Question Bluetooth Connection State

nibbo

Active Member
Licensed User
Longtime User
Hi All

I know I how to detect paired Bluetooth devices and connect to them using the serial library.
What I want to be able to do is check the connected status of a device without actually connecting to it.
I.e. detect if the phone is already connected.
So I can get paired devices via
B4X:
serial.GetPairedDevices
and loop through the device names and mac addresses but I want to be able to determine the current connected state.

I know it sounds like a strange requirement but I keep leaving my damn phone in the car.
My phone automatically connects to my car kit via Bluetooth so I though if I monitor the connection state then I could get my phone to scream at me every time it disconnects.

Is this possible? I guess it is but cannot see anything in BluetoothAdmin or Serial libraries.

Thanks
 
Top