-
@Deprecated() public class RegionBootstrap
Class allowing a user to set up background launching of an app when a user enters a beacon Region. Simply constructing and holding a reference to this class will cause background scanning for beacons to start on Android device startup. If a matching beacon is detected, the BootstrapNotifier didEnterRegion method will be called, allowing the application to launch an Activity, send a local notification, or perform any other action desired. Using this class as described above will also cause beacon scanning to start back up after power is connected or disconnected from a device if the user has force terminated the app. IMPORTANT NOTE: The RegionBootstrap class registers an internal MonitorNotifier with the BeaconManager. If you use the RegionBootstrap, your application must not manually register a second MonitorNotifier, otherwise it will unregister the one configured by the RegionBootstrap, effectively disabling it. When using the RegionBootstrap, any custom monitoring code must therefore be placed in the callback methods in the BootstrapNotifier implementation passed to the RegionBootstrap.
-
-
Constructor Summary
Constructors Constructor Description RegionBootstrap(Context context, MonitorNotifier monitorNotifier, Region region)
Constructor to bootstrap your Application on an entry/exit from a single region. RegionBootstrap(Context context, MonitorNotifier monitorNotifier, List<Region> regions)
Constructor to bootstrap your Application on an entry/exit from multiple regions RegionBootstrap(BootstrapNotifier application, Region region)
Constructor to bootstrap your Application on an entry/exit from a single region. RegionBootstrap(BootstrapNotifier application, List<Region> regions)
Constructor to bootstrap your Application on an entry/exit from multiple regions
-
Method Summary
Modifier and Type Method Description void
disable()
Used to disable additional bootstrap callbacks after the first is received. void
addRegion(Region region)
Add a new region void
removeRegion(Region region)
Remove a given region -
-
Constructor Detail
-
RegionBootstrap
RegionBootstrap(Context context, MonitorNotifier monitorNotifier, Region region)
Constructor to bootstrap your Application on an entry/exit from a single region.
-
RegionBootstrap
RegionBootstrap(Context context, MonitorNotifier monitorNotifier, List<Region> regions)
Constructor to bootstrap your Application on an entry/exit from multiple regions
-
RegionBootstrap
RegionBootstrap(BootstrapNotifier application, Region region)
Constructor to bootstrap your Application on an entry/exit from a single region.
-
RegionBootstrap
RegionBootstrap(BootstrapNotifier application, List<Region> regions)
Constructor to bootstrap your Application on an entry/exit from multiple regions
-
-
Method Detail
-
disable
void disable()
Used to disable additional bootstrap callbacks after the first is received. Unless this is called, your application will be get additional calls as the supplied regions are entered or exited.
-
removeRegion
void removeRegion(Region region)
Remove a given region
-
-
-
-