Search code examples
androidbluetooth-lowenergyibeaconibeacon-androidandroid-ibeacon

How does a Bluetooth beacon work with an app?


Does a Bluetooth beacon work like this, it transmits ID’s and a phone with BLE detects the ID and sends it to a app looking for ID's which does something if the ID matches one in a database for example

Question: Can you connect the Bluetooth beacon to a app and customize what ID is being transmitted like the boss logs in the app and the beacon starts transmitting an ID depending on the time.

The worker logs in the app and it will start listening for ID's and update a database depending on what ID it has received?

Is there handshake that needs to happen for an android app to detect ID’s being transmitted by a beacon or it can receive ID’s from any beacon?


Solution

  • Can you connect the Bluetooth beacon to a app and customize what ID is being transmitted like the boss logs in the app and the beacon starts transmitting an ID depending on the time.

    No, if you want to modify the broadcasted UUID, you have to do that on the firmware of the beacon itself, not from an app.

    The worker logs in the app and it will start listening for ID's and update a database depending on what ID it has received?

    Yes, this is very possible. In Android you can use AltBeacon and scan for beacons in your region, and based on the major/minor values you can update your database accordingly.

    Is there handshake that needs to happen for an android app to detect ID’s being transmitted by a beacon or it can receive ID’s from any beacon?

    No, there is no handshake needed. Once a Bluetooth signal starts broadcasting, as long as it is at a detectable frequency, your mobile device will be able to pick up the signal as well as the identifiers.

    Note: Consider looking into https://altbeacon.github.io/android-beacon-library/, it will clear up many of your implementation questions.