Hi,
I use InTheHand library in a small proximity detection program (btprox.sf.net). I order to detect if the device is in range, I try to connect to it and keep the connection open.This eats device's batteries.
Is there any way to detect if the device is in range without attempting to connect?
Thank you in advance,
I'm trying to achieve the same thing and hadn't considered that issue!
Is it an option for you to poll for what devices in range on a given interval? The problem is that you won't know immediately when a device drops out of proximity I guess.
Paul
Right now I do use polling. But, in order to detect if the device is in range, I make a connection attempt. If it succeed, the device is in range, otherwise, it is lost.
I was trying this without any paired devices on my system and 2 phones set discoverable, therefore they did only show up when in range. This is no good because it's obviously not a good idea to leave your device permanently discoverable.