Commit a41f9381 authored by Chris Scott's avatar Chris Scott

Update README.md

Docs error.
parent 126f8771
...@@ -353,13 +353,14 @@ bgGeo.getGeofences(function(geofences) { ...@@ -353,13 +353,14 @@ bgGeo.getGeofences(function(geofences) {
####`onGeofence(callbackFn)` ####`onGeofence(callbackFn)`
Adds a geofence event-listener. Your supplied callback will be called when any monitored geofence crossing occurs. The `callbackFn` will be provided the following parameters: Adds a geofence event-listener. Your supplied callback will be called when any monitored geofence crossing occurs. The `callbackFn` will be provided the following parameters:
######@param {Object} geofence. This object contains 2 keys: `@param {String} identifier` and `@param {String} action [ENTER|EXIT]`. ######@param {Object} params. This object contains 2 keys: `@param {String} identifier` and `@param {String} action [ENTER|EXIT]`.
######@param {Integer} taskId The background taskId which you must send back to the native plugin via `bgGeo.finish(taskId)` in order to signal that your callback is complete. ######@param {Integer} taskId The background taskId which you must send back to the native plugin via `bgGeo.finish(taskId)` in order to signal that your callback is complete.
``` ```
bgGeo.onGeofence(function(params, taskId) { bgGeo.onGeofence(function(params, taskId) {
try { try {
console.log('A geofence has been entered: ' + identifier); console.log('A geofence has been crossed: ', params.identifier);
console.log('ENTER or EXIT?: ', params.action);
} catch(e) { } catch(e) {
console.error('An error occurred in my application code', e); console.error('An error occurred in my application code', e);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment