Closed kumar-kondiker closed 5 years ago
Hi all, I am using geofence plugin for cordova app I m getting called onTransitionReceived callback method when user at current region if user croses the region onTransitionReceive not getting called.
Code
`
function onDeviceReady() { window.geofence.initialize().then(function () { }, function (error) { alert("Error", error); }); let fence = [{ id: "69ca1b88-6fbe-4e80-a4d4-ff4d3748acdb", latitude: xx.956786, longitude: xx.743058, radius: 1000, transitionType: 1, notification: { id: 11, title: "Welcome!", text: "You're in.", openAppOnClick: true } }, { id: "69ca1b88-6fbe-4e80-a4d4-ff4d3748acdc", latitude: xx.956786, longitude: xx.743058, radius: 1000, transitionType: 2, notification: { id: 22, title: "bye!", text: "You're out .", openAppOnClick: true } }] window.geofence.addOrUpdate(fence).then(function () { //alert(JSON.stringify(geofences)); navigator.notification.alert('successfully added', function () { }); }, function (reason) { navigator.notification.alert('failed', function () { }); }) window.geofence.onTransitionReceived = function (geofences) { geofences.forEach(function (geo) { alert("geo " + JSON.stringify(geo)); }); }; };`
Any help would be really appreciated
I too have the same issue. Any help would be appreciated
Hi all, I am using geofence plugin for cordova app I m getting called onTransitionReceived callback method when user at current region if user croses the region onTransitionReceive not getting called.
Code
`
Any help would be really appreciated