Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

setRangeNotifier(RangeNotifier) has been deprecated?

I am using the alt.beacon library and now I get this warning:

warning: [deprecation] setRangeNotifier(RangeNotifier) in BeaconManager has been deprecated.

But what is the replacement? I need to range the beacons from a region and the callback RangeNotifier it crucial to implement this feature.

public interface RangeNotifier {
    void didRangeBeaconsInRegion(Collection<Beacon> var1, Region var2);
}

Anyone has a sample of how the new library is supposed to work?

thx!

like image 807
gmmo Avatar asked Feb 07 '23 09:02

gmmo


1 Answers

Starting with version 2.9, you may have more than one RangeNotifier. So instead of calling:

beaconManager.setRangeNotifier(rangeNotifier);

Simply call:

beaconManager.addRangeNotifier(rangeNotifier);
like image 120
davidgyoung Avatar answered Feb 13 '23 05:02

davidgyoung