Description

This function provides a callback function to the SDK that will be called when the device has triggered a Geofence or crossed a Geoline™. Identifying information on the fence, the zone and location are passed back to the callback function as separate parameters.

Parameters

callback (Function)

This is a function that will be called when the device has triggered a Geofence or crossed a Geoline™.

Function parameters

The callback function has passed 5 parameters of the fence information, including the zone the fence is within; each entry contains the following information in the order provided:

Parameter 1: Fence Info array

Fence name

Fence description

Fence id

Parameter 2: Zone Info array

Zone name

Zone description

Zone id

Parameter 3: Location Info array

Date of check-in; this is provided as a UNIX timestamp

Latitudinal coordinate at the point of check-in

Longitudinal coordinate at the point of check-in

Bearing degree of check-in

Speed of check-in

Parameter 4: Fence is awaiting check-out

Parameter 5: JSON Object of custom data (JSON Object)

These strings can be accessed by using an enum as demonstrated in the bdFunctions.js Javascript wrapper that is bundled with the Bluedot plug-in.