Search code examples
flutteribeaconbeaconaltbeaconproximitysensor

Can flutter_beacon package be used to make Social Distancing app in Flutter?


I am working on social distancing app in flutter. Can I use flutter_beacon package for social distancing? I have tried the example code from

https://pub.dev/packages/flutter_beacon/example

but the screen keeps loading i tried to install in two phones but it doesn't detect any of them.


Solution

  • In order for two phones to detect each other with BLE beaconing you need them to do two things:

    1. Advertise a beacon over BLE
    2. Scan for beacons over BLE

    But flutter_beacon only does item 2 above. For item 1, you need another package. Try beacon_broadcast:

    https://pub.dev/packages/beacon_broadcast

    You need to do both at once.

    If you use these, you can build a social distancing app on Android and iOS, but it will only work on iOS in the foreground as beaconing stops in the background on that platform.