Exemple #1
0
 protected override void OnDestroy()
 {
     base.OnDestroy();
     _rangeNotifier.DidRangeBeaconsInRegionComplete -= RangingBeaconsInRegion;
     _iBeaconManager.StopRangingBeaconsInRegion(_rangingRegion);
     _iBeaconManager.UnBind(this);
 }
        void CloseApp()
        {
            rangeNotifier.DidRangeBeaconsInRegionComplete -= RangingBeaconsInRegion;
            beaconMgr.StopRangingBeaconsInRegion(rangingRegion);
            monitorNotifier.EnterRegionComplete -= EnteredRegion;
            monitorNotifier.ExitRegionComplete  -= ExitedRegion;

            beaconMgr.UnBind(this);
            base.OnDestroy();
        }
 protected override void OnDestroy()
 {
     base.OnDestroy();
     monitorNotifier.EnterRegionComplete           -= EnterRegion;
     monitorNotifier.ExitRegionComplete            -= ExitRegion;
     rangeNotifier.DidRangeBeaconsInRegionComplete -= RangingBeaconsInRegion;
     beaconManager.StopMonitoringBeaconsInRegion(monitorRegion);
     beaconManager.StopRangingBeaconsInRegion(rangeRegion);
     beaconManager.UnBind(this);
 }
Exemple #4
0
        public override void OnDestroy()
        {
            if (livecard != null && livecard.IsPublished)
            {
                _rangeNotifier.DidRangeBeaconsInRegionComplete -= RangingBeaconsInRegion;

                _iBeaconManager.StopRangingBeaconsInRegion(_rangingRegion);
                _iBeaconManager.UnBind(this);

                livecard.Unpublish();
                livecard = null;
            }
            base.OnDestroy();
        }
                public override void StopRangingBeacons(BeaconRegion region)
                {
                    if (IBeaconManagerBound == true)
                    {
                        DroidBeaconRegion droidRegion = region as DroidBeaconRegion;

                        Rock.Mobile.Util.Debug.WriteLine("Stop ranging beacons with UUID: " + droidRegion.Region.ProximityUuid);
                        IBeaconManager.StopRangingBeaconsInRegion(droidRegion.Region);
                    }
                    else
                    {
                        // queue it for when we ARE bound
                        PendingStopRanging.Add(region);
                    }
                }
Exemple #6
0
 private void StopTracking()
 {
     try
     {
         iBeaconManager.StopMonitoringBeaconsInRegion(monitoringRegion);
         iBeaconManager.StopRangingBeaconsInRegion(rangingRegion);
         trackButton.Text = GetString(Resource.String.StartTracking);
         LogToDisplay("No longer searching for R2");
         dashboard.Background = new ColorDrawable(Color.Black);
     }
     catch (Exception ex)
     {
         Log.Error("FindR2Activity.StopTracking", ex.Message);
         throw;
     }
 }
Exemple #7
0
        protected override void OnDestroy()
        {
            base.OnDestroy();

            _monitorNotifier.EnterRegionComplete -= EnteredRegion;
            _monitorNotifier.ExitRegionComplete  -= ExitedRegion;

            _rangeNotifier.DidRangeBeaconsInRegionComplete -= RangingBeaconsInRegion;

            foreach (var monitoringRegion in _monitoringRegionsList)
            {
                _iBeaconManager.StopMonitoringBeaconsInRegion(monitoringRegion);
            }

            foreach (var rangingRegion in _rangingRegionsList)
            {
                _iBeaconManager.StopRangingBeaconsInRegion(rangingRegion);
            }
            _iBeaconManager.UnBind(this);
        }