Last active
December 27, 2015 04:09
-
-
Save edewit/7264844 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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