Geofence Monitoring

Geofence Monitoring

Once you have integrated and initialized Locally’s Android and/or iOS EngageSDKs, you’ll be able to monitor location-based marketing for a delimited, actual geographical area (aka a “geofence“)  from right within your app!

Android Applications

For Android Applications, Geofence monitoring can be both started and stopped.

When monitoring Geofences for Android Applications, a radius and refresh interval are defined. By default, these values are: a radius of 500 miles, refreshed every 10 mins (measured in miliseconds).

Start Geofence Monitoring

private fun startMonitoring(){
            EngageSDK.startMonitoringGeofences(radius = 500, refresh = 600000) 
        }

Stop Geofence Monitoring

private fun stopMonitoring(){
            EngageSDK.stopMonitoringGeofences() 
        }

iOS Applications

You can call Engage.startMonitoringGeofences from any place in your app.

The initialized closure is used to guarantee that startMonitoringGeofences is called only after the SDK has been initialized.

Engage.initialized = {
	Engage.startMonitoringGeofences()
}

Monitor Geofences and Beacons at the Same Time

You can monitor Geofences and Beacons at the same time:

Engage.initialized = {
Engage.startMonitoringBeacons()
	Engage.startMonitoringGeofences()
}