-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enteredRegion event not fired. #30
Comments
Are you leaving the region to start your app? If your app starts within the region, you will not receive enteredRegion. |
I have found this to be an issue as well. It seems to be a little random. Sometimes the beacon is OUTSIDE and other times it's INSIDE upon monitoring beacons. If it starts inside, I don't see event happening unless the beacon is powered off/on or ranged out. Are you planning on fixing this issue in a later release, work arounds? Thanks |
I'm seeing this happen as well. I'm thinking monitoring for determinedRegionState==inside might be a good work around? |
since you can get the regionState it's trivial to add code similar to this var beaconsInRange = []; //array to hold deacons currently being monitored
var beacons = [] //array of beacons info
function regionState(e) {
Ti.API.info(e);
if(e.regionState == "inside") {
if(!_.contains(beaconsInRange, e.identifier)) {
var beacon = _.findWhere(beacons, {identifier: e.identifier});
beaconsInRange.push(e.identifier);
TiBeacons.startRangingForBeacons(beacon);
}
}
} |
I am using the below code as stated in your example:
TiBeacons.startMonitoringForRegion({
uuid : "E2C56DB5-DFFB-48D2-B060-D0F5A71096E0",
major : 1,
minor : 4,
identifier : "Shop A"
});
but the enteredRegion event is not fired, however, determinedRegionState can be fired.
Please help, thanks
The text was updated successfully, but these errors were encountered: