To get to know more about Geofencing check out the User Guide.
To integrate Geofencing, add the dependency for google-play-services-geofence to you a pp-level build.gradle file:
Retrieve Geofences from BroadcastReceiver
Each time a user enters or exits a geofence zone defined in the Accengage User Interface, your app may receive their specific information (like latitude, longitude, etc).
Create a BroadcastReceiver
To receive them, you should first create a BroadcastReceiver:
Modify your AndroidManifest.xml
Now, we have to add our “GeofenceReceiver” class to the AndroidManifest.xml in order to allow the SDK to trigger it when needed:
Retrieving Geofences from ContentProvider
Since the version 3.5.0 geofences could be retrived from ContentProvider using A4SContract with specified URI. The code snippet instantiating a CursorLoader is shown below:
For more details please see A4SGeofences sample (v3.5.0 is required) allowing to list geofences and sort them by name, distance, radius, detected count,... in ascending/descending order.
A sample is available on Github: https://github.com/Accengage/accengage-android-sdk-samples/tree/master/AccGeofences