Get Beacon Param on Enter Region

Home - Get Beacon Param on Enter Region

Ignatius Alex asked 7 months ago

In my MesosferApp i’ve implement CBBoostrapListener,  So, what i want is when the device enter the beacon region and trigger didEnterRegion, I want to get that beacon parameter(minor). As you can see onCreate(), I make this app do scan all becon with spesific uuid and major. The param that i’ve been spesified is not null (major+uuid), but the minor is null.
Is there anything i can do to get minor without have to specified it on new CBRegion?

Start your code here

@Override
public void onCreate() {
super.onCreate();
//enable Mesosfer Push notification
Mesosfer.setPushNotification(true);

// initialize Mesosfer SDK - PetraIndoorNavigation App
Mesosfer.initialize(this, "xxxx", "xxxx");

// set Cubeacon SDK log level to verbose mode
Logger.setLogLevel(LogLevel.VERBOSE);

// initializing Cubeacon SDK
Cubeacon.initialize(this);
CBBootstrapRegion.setup(this,
new CBRegion("com.eyro.cubeacon.bootstrap_region",
UUID.fromString("cb10023f-a318-3394-4199-a8730c7c1aec"),111));

}
@Override
public void didEnterRegion(CBRegion cbRegion) {
Log.d("DID", "Entering region: " +cbRegion+
"UUID: "+cbRegion.getMinor());
}


1 Answers
Alann Maulana Staff answered 7 months ago

Hi Ignatius,
Please read Cubeacon SDK for Android Wiki within Region section. If you need to get a specific beacon parameters like Proximity UUID + Major + Minor when entering or exiting region, you need to define all the parameters when setup region.
There is an example about how to using dynamic scan beacon by using a backend, you can check the sample code here and the complete tutorials here.
Regards.

Your Answer