public static async Task AddRegions() { await Task.Run(() => { AddGeofences(); }); } public static async Task AddGeofences() { List dtos = SharepointService.GetLocationsList(); // TODO - You should use GetAssignedTasksList(); IReadOnlyDictionary regionsMonitoring = CrossGeofence.Current.Regions; foreach (LocationDto dto in dtos) { if (regionsMonitoring.ContainsKey(dto.LocationName)) continue; var geoRegion = new GeofenceCircularRegion(dto.LocationName, Convert.ToDouble(dto.Latitude), Convert.ToDouble(dto.Longitude), Convert.ToDouble(dto.Radius)) { NotifyOnEntry = true, NotificationEntryMessage = "Entered " + dto.LocationName, ShowEntryNotification = true, NotifyOnExit = true, NotificationExitMessage = "Exited " + dto.LocationName, ShowExitNotification = true, Persistent = true, }; CrossGeofence.Current.StartMonitoring(geoRegion); CrossGeofence.GeofencePriority = GeofencePriority.HighAccuracy; } }