I am working with iBeacons and using the AltBeacon library.
beaconManager.getBeaconParsers()
.add(new BeaconParser()
.setBeaconLayout("m:2-3=0215,i:4-19,i:20-21,i:22-23,p:24-24"));
I would like my Android app to detect and generate an event when beacons enter and exit visibility. This works just fine fine with a single beacon using the library using methods.
public void **didEnterRegion**(Region region)
and
public void **didExitRegion**(Region region)
My problem is when multiple beacons are visible at the same time.
I am trying to maintain an array with all beacons visible.
I want to generate an event each time a beacon enters and exits.
The event should identify the beacon that generated the event by it's unique Identifier.
My beacons are uniquely identifiable using the beacon.getIdentifiers()
or (UUID, Major and Minor)
The problem is that the didExitRegion
method does not get executed until all beacons exit the region.
Can anyone think of a simple way for me to achieve my goals using AltBeacon library?
Any suggestions would be greatly appreciated.
didExitRegion
method was run? Thanks – pb772