-
Notifications
You must be signed in to change notification settings - Fork 10
Beacon Region
Beacon region is like a filter or a regular expression. Each beacon is identified by three values:
-
Proximity UUID, most commonly represented as a string, e.g.
CB10023F-A318-3394-4199-A8730C7C1AEC
. -
Major, an unsigned short integer, i.e., an integer ranging from
1
to65535
, (0
is a reserved value). - Minor, also an unsigned short integer, like the major number.
There are four options when it comes to ranging or monitoring beacon by a region:
-
Proximity UUID + Major + Minor, the most specific option that only scan beacon with specific proximity UUID, major and minor.
CBRegion region = new CBRegion("regionId", "CB10023F-A318-3394-4199-A8730C7C1AEC", 1, 284);
By using this region, scanner only return beacon(s) with proximity UUID
CB10023F-A318-3394-4199-A8730C7C1AEC
, major number1
and minor number284
-
Proximity UUID + Major, option that only scan beacon with specific proximity UUID and major number.
CBRegion region = new CBRegion("regionId", "CB10023F-A318-3394-4199-A8730C7C1AEC", 1);
By using this region, scanner only return beacon(s) with proximity UUID
CB10023F-A318-3394-4199-A8730C7C1AEC
, major number1
and minor number within range0
to65535
. -
Proximity UUID, option that only scan beacon with specific proximity UUID.
CBRegion region = new CBRegion("regionId", "CB10023F-A318-3394-4199-A8730C7C1AEC");
By using this region, scanner only return beacon(s) with proximity UUID
CB10023F-A318-3394-4199-A8730C7C1AEC
, major and minor number within range0
to65535
for each of it. -
No Parameters, option that scan all nearby beacon without specific proximity UUID, major or minor.
CBRegion region = new CBRegion("regionId");
By using this region, scanner will return all beacons without specific proximity UUID, major and minor number within range
0
to65535
for each of it.