A geofence is used to specify a custom geographical location, such as a coffee shop, an auto dealership or a retail outlet. If you want to monitor user activity in a certain location, you can create a geofence around it to be notified when an user enters or exits the geofence. You can deliver contextually relevant experience to your users this way.
With support for unlimited geofences, the Nikaza Location Services Framework is more powerful than the native Android geofencing.
- Integrate the latest version of the Nikaza Location Services Framework into your app
- Create a virtual beacon (geofence) in Nikaza Context Hub.
- Listen to entry and exit events via following callbacks
didEnter_geofence
didExit_geofence
Learn more about SDK implementation.
- User creates a virtual beacon (geofence) in Nikaza context hub. Email us at [email protected] if you do not have access to Nikaza context hub.
- Location meta-data (such as venue name, zone name, campaign URLs) is attached to the virtual beacon.
- When the SDK finds a matching geofence the user is notified and its metadata is retrieved.
For example, to get a callback when user has entered into a geofence or exited from a geofence, use Geofences.
// When a geofence is entered, a ‘didEnter_geofence:’ call gets triggered
@Override
public void didEnter_geofence(GeofenceTriggerData geofenceTriggerData) {
Log.e(TAG,"Entered into geofence : "+geofenceTriggerData.geofenceIdList);
}
// When a geofence is exited, a ‘didExit_geofence:’ call gets triggered
@Override
public void didExit_geofence(GeofenceTriggerData geofenceTriggerData) {
Log.e(TAG,"Exited geofence : "+geofenceTriggerData.geofenceIdList);
}
Questions? We're here to help.
Email us at [email protected] and we’ll help you sort it out.