Skip to content
Alann Maulana edited this page Nov 19, 2016 · 1 revision

Beacon region is like a filter or a regular expression. Each beacon is identified by three values:

  1. Proximity UUID, most commonly represented as a string, e.g. CB10023F-A318-3394-4199-A8730C7C1AEC.
  2. Major, an unsigned short integer, i.e., an integer ranging from 1 to 65535, (0 is a reserved value).
  3. 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:

  1. 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 number 1 and minor number 284

  2. 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 number 1 and minor number within range 0 to 65535.

  3. 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 range 0 to 65535 for each of it.

  4. 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 to 65535 for each of it.

Clone this wiki locally