title: Altbeacon - Scan multiple UUID in an array
body: <p>I'm using <a href="http://altbeacon.github.io/android-beacon-library/index.html" rel="nofollow">Altbeacon</a> library for my app to scan for beacons. I've had success in scanning and pushing a notification when there is an advertisement. My requirement is I need to scan a list of UUIDs, but the example given in the docs is using only one UUID to scan.</p>
  
  <p>Here is what I did so far, I put the BeaconConsumer in my BaseActivity so that it starts scanning immediately after launch (No background scanning):</p>
  
  <pre><code>public class BaseActivity extends SlidingFragmentActivity implements BeaconConsumer {
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          ...
  
          beaconManager = BeaconManager.getInstanceForApplication(this);
          beaconManager.getBeaconParsers().add(new BeaconParser().
                  setBeaconLayout("m:2-3=0215,i:4-19,i:20-21,i:22-23,p:24-24"));
          beaconManager.bind(this);
      }
  
      @Override
      public void onBeaconServiceConnect() {
          beaconManager.setMonitorNotifier(new MonitorNotifier() {
              @Override
              public void didEnterRegion(Region region) {
                  Intent intent = new Intent(getApplicationContext(), BeaconNotificationService.class);
                  intent.putExtra("uuid", region.getId1().toString());
                  intent.putExtra("major", region.getId2().toString());
                  intent.putExtra("minor", region.getId3().toString());
                  intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                  startService(intent);
              }
  
              @Override
              public void didExitRegion(Region region) {
                  Log.i(TAG, "I no longer see any beacon");
              }
  
              @Override
              public void didDetermineStateForRegion(int state, Region region) {
                  Log.i(TAG, "I have just switched from seeing/not seeing beacons: "+state);
              }
          });
  
          try {
              beaconManager.startMonitoringBeaconsInRegion(new Region("com.my.app.boostrapRegion",
                      Identifier.parse(Constants.BT_UUID),
                      Identifier.fromInt(Constants.BT_MAJOR),
                      Identifier.fromInt(Constants.BT_MINOR)));
          } catch (RemoteException e) { e.printStackTrace(); }
      }
  
  }
  </code></pre>
  
  <p>In Constants class, I defined my UUID for testing purpose:</p>
  
  <pre><code>public class Constants {
  
      public static final String BT_UUID = "bbbbbbbb-3443-8888-3443-bb323bbb0005";
      public static final int BT_MAJOR = 0;
      public static final int BT_MINOR = 0;
  
  }
  </code></pre>
  
  <p>How do I put, let's say, an array of UUIDs to be scanned by the BeaconConsumer?</p>
  
  <p>Thanks</p>