Skip to content

Instantly share code, notes, and snippets.

@edewit
Last active December 27, 2015 04:09
Show Gist options
  • Save edewit/7264844 to your computer and use it in GitHub Desktop.
Save edewit/7264844 to your computer and use it in GitHub Desktop.
onDeviceReady: function () {
var params = {
callback: 'onGeofenceEvent',
notifyMessage: '%2$s your home!'
};
//register the application to get geofencing events in the onGeofenceEvent function
geofencing.register(params);
}
...
//status will have a indicate if the region was entered or left
function onGeofenceEvent(event) {
console.log('region event id: ' + event.fid + ' got event with status: ' + event.status);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment