private async void ShowWeather () { var manager = new WeatherManager (); var result = await manager.GetUpdatedWeather ("http://api.geonames.org/findNearByWeatherJSON?lat=-36.851193&lng=174.761510&username=demo"); // var result = await manager.GetUpdatedWeather (" http://www.mocky.io/v2/5609f41a95e00ca50798127d"); TextView weatherTextView = FindViewById<TextView> (Resource.Id.weatherTextView); weatherTextView.Text = result.ToString (); }
private async void ShowWeather () { var manager = new WeatherManager (); var result = await manager.GetUpdatedWeather ("http://api.geonames.org/findNearByWeatherJSON?lat=-36.851193&lng=174.761510&username=demo"); // var result = await manager.GetUpdatedWeather (" http://www.mocky.io/v2/5609f41a95e00ca50798127d"); if (result != null) { WeatherInfoLabel.Text = result.ToString (); } else { WeatherInfoLabel.Text = "Error"; } }