Region INSIDE Android

Hello!

I’m currently trying to develop an application that sends a randomly generated code while you’re in the beacon region. The problem so far is how do you know that you’re in a specific region in Android?

I’ve created a Region using
"String Identifier = “First region”;
String UUID = beacon.getProximityUUID();
int Major = beacon.getMajor();
int Minor = beacon.getMinor();"
as values for constructing it. My Region is called region1. Whenever I try to access region1.State INSIDE constant i get an error. Is it possible to know in Android when you’re in a Region? In IOS i found some functions which checked the state of the Region but for Android I found nothing.

Somebody has a hint?

You first need to start ranging for beacons in vicinity of the phone. See demos how to range.

Once you have discovered beacons near you know beacons are near you.

Actually i was already Ranging otherwise I wouldn’t be able to create a region with the Estimote :slight_smile:

Basically you have to monitor the Region you’re in and stop Ranging while you’re in it (then print something or whatever) and restart Ranging as soon as you’re not in beacon vicinity. I found out the answer to my problem thanks to Piotr.