Skip to content

Latest commit

 

History

History
71 lines (60 loc) · 4.76 KB

README.md

File metadata and controls

71 lines (60 loc) · 4.76 KB

WeatherApp

Table of contents

Project description

WeatherApp is a mobile application that uses OpenWeatherMap API to present information about current weather (actual temperature, perceptible temperature, weather description, atmospheric pressure, air humidity, sunrise, sunset), daily forecast for next 7 days and hourly forecast for next 24 hours. To find specific data you can enter the name of the city by yourself or use GPS signal. The application consists of two design modes: Standard Mode (default one available after launching the app) and Senior Mode (with bigger fonts, full weekdays' names, etc.).

Used technologies

  • Kotlin 1.5.10 - langauge in which the project has been written,
  • Retrofit 2.9.0 - library responsible for communicating with API,
  • Glide 4.11.0 - library responsible for displaying pictures with given url,
  • Play-Services-Location 18.0.0 - library responsible for using GPS,
  • Material 1.3.0 - library responsible for using Material Design components,
  • Navigation 2.3.5 - library responsible for moving between the fragments,
  • Room 2.3.0 - library responsible for storing weather data locally.

How to compile it?

WeatherApp uses REST API with API KEY. If you just want to test it on your mobile phone, you can download an .apk from Releases and install it. Otherwise, if you want to change something in the code and compile it by yourself, you'll have to generate your own API KEY as it is not contained in this repository. To do it, follow the steps from this instruction and replace the value of apiKey in the line 28 of model/api/ApiRequest.kt file with your key:

private const val apiKey = "YOUR_API_KEY"     // place your apiKey here

How to use it?

After launching the application for the first time, you'll see "NO DATA" caption instead of the weather information. In further sessions the application will remember the data from the past, but this time use one of the three buttons placed in the app bar to find forecasts by the city name or your location. The main screen contains also everything that has been mentioned in project description.

MainScreen1 MainScreen2

First button allows user to enter the name of the city and get its weather data. If given city name doesn't exist in OpenWeatherMap database, the application will show a snackbar with appropriate information. Snackbars can also pop up if user tries to get the data without internet connection. Second button is used to get weather data by current location. This option requires enabling GPS signal (and permission to use it), so if it is disabled, again, appropriate snackbar will be displayed. The last button is responsible for changing display mode from Standard to Senior and inversly. Each of these three features is represented by Material Design Dialog.

Dialog1 Dialog2 Dialog3

As it was mentioned in project description, the Senior Mode looks different than Standard Mode - the fonts and the icons are bigger in the main content as well as in the dialogs and in the snackbars, weekdays' names are in full representation and whole text has no transparency.

SeniorMainScreen SeniorDialog1 SeniorDialog3

Project status

Although it would be great to have a widget with weather forecast, WeatherApp is considered as finished.

Credits

Launcher icon made by Those Icons from Flaticon.