Exemplo n.º 1
0
        public async void RecordStatus(GeofenceRegion region, GeofenceStatus status)
        {
            var activity = new ModelsData.GeofenceActivity()
            {
                ActivityUtcDateTime = System.DateTime.UtcNow,
                Region             = region.Identifier,
                Status             = status.ToString(),
                GeofenceActivityId = System.Guid.NewGuid()
            };

            activity.Longitude = currentLocation.Longitude;
            activity.Latitude  = currentLocation.Latitude;

            await DataRetrievalService.WriteGeofencingActivityRecord(activity);

            await RefreshRecentGeofenceStatus();
        }