I'm looking for a way to automatically connect Android device to a Bluetooth LE (4.0 Smart) device when it comes in range (and starts advertising). I expect it to work like a Bluetooth headphones - when turned on they automatically connect to a paired phone (if it is in range).
I thought about running a Service in background that will periodically (every 50-100ms) check for advertisement. However one of the main concerns is battery life of Android device.
Could someone please advice what would be the best way to implement such functionality on Android 4.3 and up ?
Thanks in advance!