Skip to content
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 while app is monitoring #35

Open
SebThePalm opened this issue May 19, 2015 · 1 comment
Open

enteredRegion event not fired while app is monitoring #35

SebThePalm opened this issue May 19, 2015 · 1 comment

Comments

@SebThePalm
Copy link

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?

@EIBHomeControl
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants