public class CBBootstrapRegion
extends java.lang.Object
CBBootstrapListener
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 CBBootstrapRegion class registers an internal
CBMonitoringListener with the Cubeacon. If you use the CBBootstrapRegion ,
your application must not manually register a second CBMonitoringListener,
otherwise it will unregister the one configured by the CBBootstrapRegion,
effectively disabling it. When using the CBBootstrapRegion, any custom
monitoring code must therefore be placed in the callback methods in the
CBMonitoringListener implementation passed to the CBBootstrapRegion.
| Constructor and Description |
|---|
CBBootstrapRegion() |
| Modifier and Type | Method and Description |
|---|---|
void |
addBootstrapRegion(CBRegion region)
Add a new bootstrap region for scanning.
|
void |
disable()
Used to disable additional bootstrap callbacks after the first is received.
|
void |
removeBootstrapRegion(CBRegion region)
Remove a given region for scanning.
|
static void |
setup(CBBootstrapListener listener,
CBRegion region)
Initialize to bootstrap your Application on an entry/exit from a single region.
|
static void |
setup(CBBootstrapListener listener,
java.util.List<CBRegion> regions)
Initialize to bootstrap your Application on an entry/exit from multiple region.
|
public static void setup(CBBootstrapListener listener, CBRegion region)
listener - The listener for bootstrap regionregion - The region for scanningpublic static void setup(CBBootstrapListener listener, java.util.List<CBRegion> regions)
listener - The listener for bootstrap regionregions - The list of region for scanningpublic void disable()
public void addBootstrapRegion(CBRegion region)
region - The region to addpublic void removeBootstrapRegion(CBRegion region)
region - The region to remove