0

I have an application that is using RegionBootstrap to look for a set of regions. In the onCreate method of my Application class I instantiate the RegionBootstrap and pass it a list of Regions. This works great, and as expected. Is there a way to update the regions that the RegionBootstrap is looking for later on, after instantiation? I have a database table that is storing some region data, and that can get updated throughout the lifetime of the application. I have a content observer watching for updates but I don't know how to add/remove regions accordingly. Thanks!

Greg Neiheisel
  • 590
  • 4
  • 12

1 Answers1

1

Apologies for the late reply to this question. I think you can find an answer to a similar question here:

How can I "refresh" my RegionBootstrap (Android Beacon Library)?

Quote:

You should construct a RegionBootstrap only once. If you want to alter the monitored regions by adding new ones, just do so directly on BeaconManager like this:

beaconManager.startMonitoringBeaconsInRegion(new Region("myMonitoringUniqueId", null, null, null));
Community
  • 1
  • 1
davidgyoung
  • 63,876
  • 14
  • 121
  • 204
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – Laur Ivan Jul 23 '15 at 14:35
  • It was a very short two line answer :) Nevertheless, I have copied the two lines verbatim. – davidgyoung Jul 23 '15 at 15:07