HOW TO GET CORRECT BEACONLAYOUT?

Barbara Jones

Total Post:13

Points:91
Posted by  Barbara Jones
Java 
 2975  View(s)
Ratings:
Rate this:

I am trying to use AltBeacon to detect RadiusNetwork beacons. I am aware that i need to use setBeaconLayout() to get beacons(other than AltBeacons) detected. But, I am not sure how to get the Layout for the beacons that i want to use. I am pretty new to beacons.

Right now i have RadiusNetwork beacon, with ID "2F234454-CF6D-4A0F-ADF2-F4911BA9FFA6" (for example), how do i get the Layout for this? I tried googling, but didn't get much help. Is there a way to get the layout pattern for devices? If at a later stage, i want to use some other device, how do i find the layout for that device?

Will this work?

mAllBeaconsRegion = new Region("RadBeacon USB",

                Identifier.parse("2345454-AF9V-0Z0T-RQCS-45454DFDFF45"),

                Identifier.parse("1"), Identifier.parse("1"));

  1. Alex Leblois

    Post:67

    Points:471
    Re: How to get correct BeaconLayout?

    I have used the following code below for RadBeacon. I am still not sure on how to get the correct BeaconLayout for a beacon, but the following worked for me.

        mBeaconManager

                .getBeaconParsers()

                .add(new BeaconParser()

                        .setBeaconLayout("m:2-3=0215,i:4-19,i:20-21,i:22-23,p:24-24,d:25-25"));

     

        mAllBeaconsRegion = new Region("RadBeacon",

                Identifier.parse("2345454-AF9V-0Z0T-RQCS-45454DFDFF45"),

                Identifier.parse("1"), Identifier.parse("1"));

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!