Ejemplo n.º 1
0
        private async void PostGeoData(Location location)
        {
            using (var client = ClientHelper.GetClient(CrossSettings.Current.GetValueOrDefault("token", "")))
            {
                GeoModel model = new GeoModel
                {
                    gps_time = DateTime.Now,
                    lat      = location.Latitude.ToString().Replace(",", "."),
                    lng      = location.Longitude.ToString().Replace(",", ".")
                };

                DriverInfoService.InitializeClient(client);
                var o_data = new ServiceResponseObject <SuccessResponse>();
                o_data = await DriverInfoService.PostGeoData(model);

                Toast.MakeText(Application.Context, o_data.Message, ToastLength.Long).Show();
            }
        }