private async Task LoadData() { try { IVehicleProxy vehicleProxy = BasicProxiesFactory.GetVehicleProxy(); var response = await vehicleProxy.GetVehicle(); _vehiclesList = response.Data; } catch (Exception e) { Activity.RunOnUiThread(() => Toast.MakeText(Activity, "¡Lo sentimos! El envío de comentarios no se encuentra disponible.", ToastLength.Long).Show() ); } }
private async Task LoadVehicles() { System.Diagnostics.Debug.WriteLine("LoadVehicles()"); try { IVehicleProxy vehicleProxy = BasicProxiesFactory.GetVehicleProxy(); var response = await vehicleProxy.GetVehicleInRange(_userLocation); VehicleLocation = response.Data.ToList(); } catch (Exception e) { System.Diagnostics.Debug.WriteLine("Error"); //bool dialogResult = await AlertDialogHelper.ShowAsync(Activity, "Error", "Ha sucedido en error en la aplicación. Vehiculos", "Reintentar", "Cancelar"); Activity.RunOnUiThread(() => Toast.MakeText(Activity, "¡Lo sentimos! Las unidades no se encuentran disponibles.", ToastLength.Long).Show() ); Activity.RunOnUiThread(() => RenderMap() ); } }