I am using Android Beacon Library, and I would like to know how to filter the detected beacons by the mac addresses given by the method startDiscovery from Android SDK.
The Android Beacon Library allows you to filter on all beacons with a specific mac address. This relatively new feature is available as of version 2.6 of the library. Setting up a Region
to match all beacons with a known mac address is as simple as follows:
Region region = new Region("regionForMacAddress", "01:02:03:04:05:06");
beaconManager.startRangingBeaconsInRegion(region);
The above code will provide ranging callbacks for any beacon with any identifier matching the given mac address. If you want to look for multiple mac addresses at the same time, just duplicate the above code for each mac.