Android 如何检查我是否进入或退出爱奥尼亚3的geofence区域

Android 如何检查我是否进入或退出爱奥尼亚3的geofence区域,android,cordova,ionic-framework,cordova-plugins,geofencing,Android,Cordova,Ionic Framework,Cordova Plugins,Geofencing,在我的项目中,我在添加geofence时设置了任何特定的位置经纬度,如何检查我是进入geofence还是退出geofence private addGeofence() { let fence = { id: '69ca1b88-6fbe-4e80-a4d4-ff4d3748acdb', //any unique ID latitude: 20.115617, //center of geofence radius

在我的项目中,我在添加geofence时设置了任何特定的位置经纬度,如何检查我是进入geofence还是退出geofence

     private addGeofence() {
         let fence = {
         id: '69ca1b88-6fbe-4e80-a4d4-ff4d3748acdb', //any unique ID
         latitude:       20.115617, //center of geofence radius
        longitude:     73.859157,
        radius:         100, //radius to edge of geofence in meters
        transitionType: 3, //see 'Transition Types' below
        notification: 
             { //notification settings
                 id:  1, //any unique ID
                 title: 'You crossed a fence', //notification title
                 text: 'You just arrived to Gliwice city center.', //notification body
               openAppOnClick: true //open app when notification is tapped
            }
     }
    this.geofence .addOrUpdate(fence).then(
       () =>{
        console.log('Geofence added')
        this.CheckGeofenceTansition();
       } ,
       (err) => console.log('Geofence failed to add')
     );
 }

CheckGeofenceTansition()
         {
           console.log("geofence on transition recieved Method Called");
           if(this.geofence.onTransitionReceived())
             {
                alert("you are in geofence")
                this.navCtrl.push(NavigationMenuPage)
             }
         else{
             alert("you are out of geofence");
            }
   }

Nupur,你有什么解决方案吗?是的,我找到了解决方案,我第一次使用了我设置为false的标志,在收到的方法转换中,我将其设置为true,所以如果它为true,那么用户将成功登录@Nupur,它在后台工作吗?Nupur,你有什么解决方案吗?是的,我找到了解决方案,我使用了我第一次设置为false的标志,在收到的方法转换中,我将其设置为true,所以如果为true,则用户将成功登录@Nupur,它是否在后台工作?