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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

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

Post 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 50 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 50 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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply