Search code examples
androidbluetoothbluetooth-lowenergybeacon

I want to pair my Android device to a beacon or other BTLE device, and if I move my device too far away from that beacon, lock the screen or send msg


I have Android devices mounted on vehicles in a manufacturing facility, and I'd like to deter people from removing them from one vehicle and moving it to another vehicle, but also still allow it (long story, but instead of physically locking the device to the vehicle with a cable or other device I'm looking to make it more inconvenient than impossible...). I was thinking if I mounted a Bluetooth low energy BTLE device or beacon of some sort to the vehicle in some inaccessible location, then pair my Android device to that beacon, my device would be allowed to work as long as it 'saw' that beacon. If someone were to move the device to another vehicle, it wouldn't see the beacon and would have to be 'paired' to the new vehicle, supplying a reason why it had to be moved, etc. Is BTLE/beacon the right technology for this or is there something better?


Solution

  • Such a solution is possible with BLE beacons but has some implementation challenges. I have seen beacons used successfully in similar use cases like automatic workstation locking, contact tracing, virtual tethering of demo phones, and convention audience counting.

    • BLE has a range of about 30-40 meters, longer with clear line of sight. If the Android devices is moved from one vehicle to another that are within 40 meters of each other, the original beacon will probably still be visible.

    • You may be able to address the above issue with a "closest beacon" strategy, meaning that you consider whatever is seen as closest beacon above a certain signal threshold to be the vehicle the device is on or in.

    • If you use a battery-powered beacon, you can mount it anywhere, but battery life will typically be limited to a year or less.

    • A plugged-in beacon will never run out of power, but requires a USB supply, and AC outlet, or a DC supply like a car cigarette lighter port. This limits where you can hide it.

    As you mention, there are other solutions aside from BLE like physical tether. But it is not inappropriate to consider BLE as it is widely used for similar proximity measurement applications.