void HandleEnterBeaconRegion(Beacon beacon) { //TODO: generate here an activityEvent and pass it to the challengeEnginge if (BeaconFound != null) { BeaconFound(beacon); } }
void HandleBeaconLost(Beacon beacon) { if (paused) { ShowNotification(); } UpdateDisplay(String.Format("Beacon with ID {0} lost!",beacon.UniqueId), Color.Red); }
void HandleBeaconFound(Beacon beacon) { if (paused) { ShowNotification(); } UpdateDisplay(String.Format("Beacon with ID {0} found!",beacon.UniqueId), Color.Green); }
public static Region ConvertBeaconToRegion(Beacon beacon) { return new Region(beacon.UniqueId.ToString(), beacon.UniqueId.ToString(), null, null); }
public void StopObserveBeacon(Beacon beacon) { beaconManager.StopMonitoringBeaconsInRegion(RegionBeaconConverter.ConvertBeaconToRegion(beacon)); }
public bool StartObserveBeacon(Beacon beacon) { if (beaconManager.IsBound(this)) { beaconManager.StartMonitoringBeaconsInRegion(RegionBeaconConverter.ConvertBeaconToRegion(beacon)); return true; } else { beaconsToStart.Add(beacon); return false; } }
public bool StartObserveBeacon(Beacon beacon) { locationManager.StartMonitoring(RegionBeaconConverter.ConvertBeaconToRegion(beacon)); return true; }
public static CLBeaconRegion ConvertBeaconToRegion(Beacon beacon) { var region = new CLBeaconRegion(new NSUuid(beacon.UniqueId.ToString()), beacon.UniqueId.ToString()); region.NotifyOnEntry = true; region.NotifyOnExit = true; region.NotifyEntryStateOnDisplay = true; return region; }
void HandleExitBeaconRegion(Beacon beacon) { //TODO: I think we don't need this event here now, but its nice to test if (BeaconLost != null) { BeaconLost(beacon); } }
public void RemoveBeacon(Beacon beacon) { this.BeaconsToObserve.Remove(beacon); this.beaconHandler.StopObserveBeacon(beacon); }
void HandleBeaconLost(Beacon beacon) { UpdateDisplay(String.Format("Beacon with ID {0} lost!",beacon.UniqueId), UIColor.Red); }
void HandleBeaconFound(Beacon beacon) { UpdateDisplay(String.Format("Beacon with ID {0} found!",beacon.UniqueId), UIColor.Green); }