nibbo Active Member Licensed User Longtime User Sep 1, 2017 #1 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 Code: 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
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 Code: 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
Erel B4X founder Staff member Licensed User Longtime User Sep 2, 2017 #2 You should use an intent filter for this. Check this filter: https://www.b4x.com/android/forum/threads/listening-for-bt-connections-with-serial.83210/ Upvote 0
You should use an intent filter for this. Check this filter: https://www.b4x.com/android/forum/threads/listening-for-bt-connections-with-serial.83210/