I need to monitor multiple beacons regions in loop. so i have the below code in the SDK.
each beacon must have onEnterAction or onExitAction
we are monitoring employees how much time they are spending on floor 1 record for Entry and 1 record for exit. i have 5 zones. i need your help. thanks in advance
for beacon in terminal_data
{
let beacon_Zone = EPXProximityZone(range: EPXProximityRange.custom(desiredMeanTriggerDistance: beacon.distance)!,
tag: beacon.tags)
beacon_Zone.onEnterAction = { zoneContext in
print("Zone Enter "+zoneContext.deviceIdentifier + zoneContext.tag)
self.lbl_EmployeeStatus.text = " Employee Status: IN " + zoneContext.tag
}
beacon_Zone.onExitAction = { zoneContext in
print("Zone Exit "+zoneContext.deviceIdentifier + zoneContext.tag)
self.lbl_EmployeeStatus.text = " Employee Status: OUT " + zoneContext.tag
}
self.proximityObserver.startObserving([beacon_Zone])
}