Skip to content

Latest commit

 

History

History
61 lines (38 loc) · 2.11 KB

Geofences.md

File metadata and controls

61 lines (38 loc) · 2.11 KB

Geofences

Contents

  1. Introduction

  2. Quickstart

  3. How it works

  4. Examples

  5. Support

Introduction

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.

Quickstart

  1. Integrate the latest version of the Nikaza Location Services Framework into your app
  2. Create a virtual beacon (geofence) in Nikaza Context Hub.
  3. Listen to entry and exit events via following callbacks
  • didEnter_geofence
  • didExit_geofence

Learn more about SDK implementation.

How it works

  • 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.

Examples

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);
    }

Support

Questions? We're here to help.

Email us at [email protected] and we’ll help you sort it out.