Exemplo n.º 1
0
 protected override void OnDestroy()
 {
     base.OnDestroy();
     monitorNotifier.EnterRegionComplete           -= EnterRegion;
     monitorNotifier.ExitRegionComplete            -= ExitRegion;
     rangeNotifier.DidRangeBeaconsInRegionComplete -= RangingBeaconsInRegion;
     beaconManager.StopMonitoringBeaconsInRegion(monitorRegion);
     beaconManager.StopRangingBeaconsInRegion(rangeRegion);
     beaconManager.UnBind(this);
 }
Exemplo n.º 2
0
 public override void StopMonitoring(BeaconRegion region)
 {
     if (IBeaconManagerBound == true)
     {
         DroidBeaconRegion droidRegion = region as DroidBeaconRegion;
         IBeaconManager.StopMonitoringBeaconsInRegion(droidRegion.Region);
     }
     else
     {
         // queue it for when we ARE bound
         PendingStopMonitor.Add(region);
     }
 }
Exemplo n.º 3
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;
     }
 }
Exemplo n.º 4
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);
        }