@Override public void didRangeBeaconsInRegion(Collection<IBeacon> iBeacons, Region region) { for (IBeacon iBeacon : iBeacons) { iBeacon.requestData(this); String displayString = iBeacon.getProximityUuid() + " " + iBeacon.getMajor() + " " + iBeacon.getMinor() + "\n"; Log.d(TAG, displayString); } myBeacons.clear(); myBeacons.addAll(iBeacons); }
@Override public void iBeaconDataUpdate(IBeacon iBeacon, IBeaconData iBeaconData, DataProviderException e) { if (e != null) { Log.d(TAG, "data fetch error:" + e); } if (iBeaconData != null) { String displayString = iBeacon.getProximityUuid() + " " + iBeacon.getMajor() + " " + iBeacon.getMinor() + "\n" + "Welcome message:" + iBeaconData.get("welcomeMessage"); Log.d(TAG, displayString); } }