async Task postLocationAsync()
        {
            var locator = CrossGeolocator.Current;

            locator.DesiredAccuracy = 50;

            var position = await locator.GetPositionAsync(TimeSpan.FromSeconds(10)); // convert from int to timespan, '1000' doesn't seem to work

            IsChickenModel model = new IsChickenModel()
            {
                Longitude = (float)position.Longitude,
                Latitude  = (float)position.Latitude,
                Timestamp = DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm",
                                                     CultureInfo.InvariantCulture)
            };

            await AzureManager.AzureManagerInstance.PostChickenInformation(model);
        }
Пример #2
0
 public async Task PostChickenInformation(IsChickenModel isChickenModel)
 {
     await this.isChickenTable.InsertAsync(isChickenModel);
 }