The Herow SDK allows your app to connect to the Herow platform or the AdTag platform.

The documentation is available for both platform.

What you will learn

You will learn to simulate your zone's entries or exits

Note: Prerequisites: You are supposed to have already configured the SDK. To do this, please refer to 5 minQuickstart You can refer to our dedicated tutorial

Prerequisites - What you need to get started

  • Your SDK credentials, including an SDK Login (identifier on Herow) and Password (SDK Key on Herow) to initialize the SDK.
  • A zone, which has been configured on your herow account.
  • An Android Device, with Bluetooth 4.0 and Android 4.0 and above, to be able to interact with BLE beacons.
  • The Android Studio application, which you can download from the Android Developers website.

Mocking geofences with Herow

Set a campaign on Herow platform

  • Connect you to the Herow Platform.
  • Create a zone.
  • Create a notification campaign associated to the zone.
  • Don’t forget to launch the campaign !

Get the hash

Mocking geofences KEY Copy the hash of the zone you want to test

Implement the Mock system

  • Implement the onCreate method of your application and past the hash zone to process the mock system.
 @Override
    public void onCreate() {
    	int delay = 10000; // start emitting (entry)  after 10 000 milliseconds
		int stopdelay = delay + 10000; // stop  emitting (exit) after 10 000 milliseconds after the entry
        HerowDetectionManager instance =  HerowDetectionManager.getInstance();
        instance.emit("my zone hash", delay);
        instance.stopEmittingIn(stopdelay);
    }

Generate your first mocked notification

  1. Install the application

  2. Accept the location permission and notification permission

  3. Close your application or leave it running in the background

  4. Wait the delay you had specified.

  5. A notification should appear

Note:

To increase the efficiency of the Mock System , make sure that the campagn has geodetection set to off in the app settings section on Herow dashboard to avoid interferences between mock and real system.

Mocking beacons with AdTag

Configure a content associated to your beacon

  • Connect you to the AdTag Platform.
  • Find your Beacon
  • keep the Beacon information(uuid, major and minor)
  • Configure a notification content in the SDK Content tab

Implement the Mock system

  • Implement the onCreate method of your application to process the mock system
 @Override
    public void  onCreate() {
    	int delay = 10000; // start emiting ( entry)  after 10 000 milliseconds
		int stopdelay = delay + 10000; // stop  emiting ( exit) after 10 000 milliseconds after the entry
		String major = --your major -- ;
		String minor = --your minor -- ;
		String uuid = --your uuid -- ;
        HerowDetectionManager instance =  HerowDetectionManager.getInstance();
        instance.emit(uuid , major, minor, delay);
        instance.stopEmittingIn(stopdelay);
    }

Generate your first mocked notification

  1. Install the application

  2. Accept the location permission and notification permission

  3. Close your application or leave it running in the background

  4. Wait the delay you had specified.

  5. Click on the notification that appears on your screen just for fun

Warning:

Think to make your application compliant with the GDPR, otherwise the SDK won't collect any data.

You can refer to our dedicated tutorial