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

regionDidEnter/regionDidExit are not firing #40

Open
montehansen opened this issue Dec 6, 2016 · 3 comments
Open

regionDidEnter/regionDidExit are not firing #40

montehansen opened this issue Dec 6, 2016 · 3 comments

Comments

@montehansen
Copy link

montehansen commented Dec 6, 2016

Version

0.6.0
react-native-cli: 1.2.0
react-native: 0.38.0

Steps to reproduce

static get REGION ()
{
  var region =
  {
    "identifier" : "Entrance",
    "uuid" : "f1116da6-4fa2-4e11-1111-bc5b71e1111e",
    "major" : 2, // tried with and without major+minor
    "minor" : 63288
  }

  return region;
}
DeviceEventEmitter.addListener ( "regionDidEnter", (region) =>
{
  console.log( "***** regionDidEnter: " + JSON.stringify(region || {}, null, "\t") );
});

DeviceEventEmitter.addListener ( "regionDidExit", (region) =>
{
  console.log( "***** regionDidExit: " + JSON.stringify(region || {}, null, "\t") );
});

Beacons.requestAlwaysAuthorization();
// Beacons.requestWhenInUseAuthorization();
Beacons.startMonitoringForRegion(Entrance.REGION);
Beacons.startRangingBeaconsInRegion(Entrance.REGION);
Beacons.startUpdatingLocation();

Expected behavior

regionDidEnter/regionDidExit should fire.

Actual behavior

regionDidEnter does not to fire, or rarely does. I am using Estimote and Kontakt.IO beacons and have the same experience for both. For the Estimote, I did test using the ranging method, and the beaconsDidRange event does appear to fire and I do see change in the proximity field.

Any thoughts?

Thanks,

Monte

@montehansen
Copy link
Author

Hmmm. I moved to a different location and using the same beacons have been able to get the regionXxx methods to fire. Strange. I will close but would love some insight from anyone on that regarding experiences of what I assume could be interference?

@peterjuras
Copy link

Just a guess, but are you sure that you went far enough away from the beacons? Even beacons that are set to a very low power can be picked up for a long distance if there is no interference.

@devand123
Copy link

devand123 commented Sep 27, 2017

I'm experiencing the same. On RN 0.47.0

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

3 participants