Support Center

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

didenterbeacons and didentersite are calling repeatedly

Alvaro Apr 04, 2017 03:45PM CDT

hi, im trying bluecats sdk on Android, i want to run the beaconmanagercallback in a service but after a couple of minutes the didenterbeacons and didentersite are calling repeatedly, the bluecats beacon is on the same place and i don’t change my position, i want to know if this is normal, my code is:

@Override
public int onStartCommand(final Intent intent, final int flags, final int startId) {
super.onStartCommand(intent, flags, startId);

BlueCatsSDK.startPurringWithAppToken(getApplicationContext(), appToken);

if (!mRunning) {
mRunning = true;
System.out.println("not running");
myBCBeaconManagerCallback = new MyBCBeaconManagerCallback();
bcBeaconManager = new BCBeaconManager();
bcBeaconManager.registerCallback(myBCBeaconManagerCallback);
} else {
System.out.println("running");
}

return START_STICKY;
}

class MyBCBeaconManagerCallback extends BCBeaconManagerCallback {

@Override
public void didEnterSite(BCSite site) {
super.didEnterSite(site);

System.out.println("didentersite" + didEnterSite);

//show a message that the beacon was discovered
}

public void didEnterBeacons(List<BCBeacon> beacons) {
super.didEnterBeacons(beacons);

Log.d(TAG, "didEnterBeacons " + getBeaconNames(beacons));

}

This question has received the maximum number of answers.

Contact Us

  • Post a Public Question
  • Email Us
  • Call Us:
    +1 256 217 4072 (Huntsville)
    +61 2 8912 7700 (Sydney)

support@bluecats.com
http://assets0.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete