Android Features – Enable or disable Zones

An app may optionally disable (and later re-enable) Zones by calling setZoneDisableByApplication on the shared ServiceManager. This will not override any Conditions set via Canvas or Config APIs.

For example, if a Zone is configured in Canvas to be active between 1 pm and 3 pm, calls to setZoneDisableByApplication would have no effect outside of these times. During the Zone’s active period (e.g. at 2.30 pm), the Zone will be active unless disabled by setZoneDisableByApplication.

String zoneIdToDisable = ""
if(!mServiceManager.isZoneDisabledByApplication(zoneIdToDisable)){
    mServiceManager.setZoneDisableByApplication(zoneIdToDisable, true);
}
image

Interaction with the check-out feature

Note that if a Zone has already ‘checked-in’ and is awaiting a ‘check-out’ event, then disabling the Zone at this point will not prevent the check-out callback from occurring.

If it is important to suppress check-out behaviors while a Zone is disabled by your application, we advise that you make use of the isZoneDisabledByApplication method as part of your check-out callback.

Created by Bluedot DevOps on June 19, 2018

Start the discussion