DownloadJSON downloadJSON = new DownloadJSON();
try {
String result = "abc";
result = downloadJSON.execute(url).get();
JSONObject jsonObject = new JSONObject(result);
JSONObject main = jsonObject.getJSONObject("main");
String temp = main.getString("temp");
String feel_like = main.getString("feels_like");
String humidity = main.getString("humidity");
String preassure = main.getString("pressure");
String wind = jsonObject.getJSONObject("wind").getString("speed");
String time = jsonObject.getJSONArray("weather").getJSONObject(0).getString("description");
txtCity.setText(City);
txtDate.setText(time);
txtValueTemp.setText(temp +"°");
txtValueHumidy.setText(humidity+"%");
txtValueFeelLike.setText(feel_like+"°");
txtValuePressure.setText(preassure+"hPa");
txtValueWind.setText(wind+" м/с");
String nameIcon = "10d";
nameIcon = jsonObject.getJSONArray("weather").getJSONObject(0).getString("icon");
String urlIcon = "http://openweathermap.org/img/wn/"+nameIcon+"@2x.png";
DownloadIcon downloadIcon = new DownloadIcon();
Bitmap bitmap = downloadIcon.execute(urlIcon).get();
Status_weather_icon.setImageBitmap(bitmap);
} catch (ExecutionException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
} catch (JSONException e) {
e.printStackTrace();
}
}```
Сделал получение текущей, как по такому принципу, простому сделать на 5 дней, а то в интернете есть примеры но я их, не понимаю.