- Project description
- Screenshots
- Used technologies
- Set up project
- Project structure
- Download release apk
- License
It's a weather app writed in Java. App asking permission to location and use it to detect weather in your current city (if you granted permission). You can add cities manually by writing them. The whole code and design was made by me. Design you can see here in Figma. While making this project, I practiced my knowlege about databases, dependency injection, data binding, working with api and even some design skills.
Main screen:
Hourly and daily:
Custom NavDrawer:
- OpenWeatherMap for getting weather info
The app won't compile without keys.c. For security concerns this file wasn't commit to repository. There are steps how to add this file below.
- First of all, download or clone this repository
- Open this project and wait for Gradle Sync to complete
- Now you already have this app code, but for building it, you will need your own API-keys, because I can't push mine.
To do this, please follow steps with screenshots below:
- Choose project view in left side pannel
- Go to app/src/main/jni and create new file and name it keys.c
- Copy paste to keys.c this code
#include <jni.h>
JNIEXPORT jstring JNICALL
Java_com_denbondd_justweather_services_Keys_getOWMkey(JNIEnv* env, jobject this) {
return (*env)->NewStringUTF(env, "Your API-key for OpenWeatherMap");
}
If you don't know how to get your own API-key, here you go
- Now build your project again, and if you paste working api key, you can use this app now.
- com.denbondd.justweather
- dataflow - files for working with data (APIs)
- db - files for working with RoomDB
- di - files for dependency injection (Dagger2)
- models - models needed for project
- currentweatherowm - package with models for OpenWeatherMap CurrentWeather request
- findowm - models for OpenWeatherMap FindCity request
- onecallowm - models for OpenWeatherMap OneCall request
- services - files for working with retrofit
- ui - files used for user interface
- activities - all activities of project
- adapter - adapters and viewholders for recycler views
- base - base ui components, that all other inherit
- fragments - all fragments of project
- util - different extensions
Release apk isn't available now, because I'm currently working on this app. Anyway, if you want to take a look on it, you can set up this project in Android Studio.
Copyright (c) 2020 Denis Bondarenko
MIT License