Hi i have created app using altbeacon reference app. And i want to call didEnterRegion using bootstrap notifier when app sees beacon in background. But i dont want it to scan background every 5 minutes, i want my app react to new beacon immediately. Is there some way to do this ?
My Code :
private static final String TAG = ".Application";
private final Identifier uuid = Identifier.parse("A1B2C3D4-AAAA-48D2-B060-D0C0D0C0D0C0");
private RegionBootstrap regionBootstrap;
@Override
public void onCreate() {
super.onCreate();
Log.d(TAG, "App has started");
Region region = new Region(TAG, uuid, null, null);
BeaconManager.debug = true;
BeaconManager.getInstanceForApplication(this).getBeaconParsers().add(
new BeaconParser().setBeaconLayout("m:0-3=4c000215,i:4-19,i:20-21,i:22-23,p:24-24"));
regionBootstrap = new RegionBootstrap(this, region);
}
@Override
public void didEnterRegion(Region region)
{
Log.i(TAG, "BACKGROUND ACTIVATED");
}
@Override
public void didExitRegion(Region region) {
}
@Override
public void didDetermineStateForRegion(int i, Region region) {
}
}