cowbell / cordova-plugin-geofence

Geofencing plugin for cordova
Apache License 2.0
265 stars 316 forks source link

'reciveTransition' function is not working plz guide about this or give a example #213

Closed Harshad111 closed 7 years ago

VierenV commented 7 years ago

Hi, you need to override this method when the deviceReady event is triggered, or if you use ionic :

$ionicPlatform.ready(function() {
   if(window.geofence){
        window.geofence.onTransitionReceived = function (geofences) {
            var geofence;
            for(geofence in geofences){    
                ...
            }
        };
    }
tsubik commented 7 years ago

Javascript is not being executed if application is in background, I guess that could be a reason of this issue.