Search code examples
androidandroid-notificationsbeaconestimote

How implement Estimote Beacons in Android?


I have checked the developer link of estimote. I have followed all step in that and it's working fine. My concern is that I don't know anything more about that in detail and I am integrating this is for the first time.

Here is a simple flow of my application. Example:

There are 10-15(or more) beacons in college. When any of student use this android app get notification based on the beacon. What if I found 3-4 beacons in my range (I don't know how to find a list of nearest beacons). I want nearest beacons id. And then I want so send the notification based on beacon type.


Solution

  • Use Android Beacon Library: it's super-easy to integrate. You should use the ranging feature. In the samples, look for Ranging Example Code.

    Take into account that in background, only monitoring can be done (i.e. detecting if a given beacon is present, without knowing the estimated distance). Then, when your app becomes foreground, you can start ranging to find the distance of the visible beacons, to find the nearest one. Also, notice that this is an estimate.

    On this forum it states that you need to add an specific parser for Estimote:

    beaconManager.getBeaconParsers().add(
        new BeaconParser().setBeaconLayout("m:2-3=0215,i:4-19,i:20-21,i:22-23,p:24-24"));