Page 1 of 1

Forecast -date Time: long -temperature: double -pressure: int -humidity: int -windSpeed: double -windDirection: int -des

Posted: Mon Jul 11, 2022 9:54 am
by answerhappygod
Forecast Date Time Long Temperature Double Pressure Int Humidity Int Windspeed Double Winddirection Int Des 1
Forecast Date Time Long Temperature Double Pressure Int Humidity Int Windspeed Double Winddirection Int Des 1 (40.17 KiB) Viewed 52 times
To obtain the latitude and longitude, you need to use FusedLocationProviderClient.getCurrentLocation() method, thus you need to include com.google.android.gms:play-services-location:20.0.0 library in your build.gradle file and request for necessary permissions. The Open Weather Map API must be invoked on the background thread from a subclass of AndroidViewModel and the results must be stored within a MutableLiveData, as illustrated in Figure 2.
Forecast Date Time Long Temperature Double Pressure Int Humidity Int Windspeed Double Winddirection Int Des 2
Forecast Date Time Long Temperature Double Pressure Int Humidity Int Windspeed Double Winddirection Int Des 2 (25.07 KiB) Viewed 52 times
The Forecast results must be visualized using RecyclerView, and when the user select any Forecast from the list, the details of the Forecast must be displayed on an AlertDialog.
Forecast -date Time: long -temperature: double -pressure: int -humidity: int -windSpeed: double -windDirection: int -description: String +getDateTime(): long +setDateTime(dateTime: long): void +get Temperature(): double +setTemperature(temperature: +getPressure(): int +setPressure (pressure: int): void +getHumidity(): int +setHumidity (humidity: int): void double): void +getWindSpeed(): double +setWindSpeed (wind Speed: double): void +getWind Direction(): int +setWind Direction (wind Direction: int): void +getDescription(): String +setDescription(description: String): void Figure 1: Class diagram of Forecast
sd Assignment 2 MainActivity Fused Location ProviderClient ForecastViewModel 1: getCurrentLocation 2: location 3:getForecasts(location) 4 Mutable LiveData forecasts["] «create»> 5:setForecasts(forecasts[]) 7: select(forecast) ForecastAdapter «create 6 onCreateViewHolder ForecastViewHolder