enteredRegion event not fired while app is monitoring
SebThePalm opened this issue · 1 comments
Hi,
my problem:
Although monitoring is running my app doesn't fire enteredRegion and exitedRegion event.
Here's the necessary code:
tiapp.xml:
UIBackgroundModes
location
bluetooth-central
bluetooth-peripheral
NSLocationAlwaysUsageDescription
Please accept request
Code in controller:
function beaconsStartMonitoringForRegion(){
uuid = 23456789;
major = 1;
minor = 2;
TiBeacons.startMonitoringForRegion({
uuid : uuid,
major: major,
minor: minor
});
Ti.API.info("Monitoring is running now");
}
So, if you tapp on startMonitoringForRegionButton monitoring is running....
TiBeacons.addEventListener("enteredRegion", function(e){
Ti.API.info(e);
});
TiBeacons.addEventListener("exitedRegion", function(e){
Ti.API.info(e);
});
But if the configured iBeacon is in range, nothing happens
Anybody an idea?
Hi,
when you in range of the iBeacon the events will not fire.
The events only fire when you enter or leave the range.
If possible, turn off the iBeacon. exitedRegion should fired, and enteredRegion if you turn it on.
You can also try the event determinedRegionState, e.g. TiBeacons.addEventListener("determinedRegionState", alert);
Frank