Contact Us
- Post a Public Question
- Email Us
-
Call Us:
+1 256 217 4072 (Huntsville)
+61 2 8912 7700 (Sydney)
Tweets by @BlueCatsBLE
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.