Capture , Generate , Share. And check your history.
A Weather application based on openweathermap-api that let the users take a photo, add current weather information (e.g. place name, temperature, weather condition, …) as a banner overlay on top of the photo and finally, share it.
- Capture new photo by built-in camera using camera2 API
- Save photo locally
- Detect current location
- Request openweathermap-api to get current location weather data.
- Set retrieved data in views and then convert all the ViewGroup to image.
- Share the generated image accross applications.
The following diagram shows how all the modules will interact with one another.
Each component depends only on the component one level below it. For example, activities and fragments depend only on a view model. The repository is the only class that depends on multiple other classes; on a persistent data model and a remote backend data source.
A helper class that is used to take the decision of loading the data from the local db or from remote service.
The following diagram shows the decision tree for NetworkBoundResource:
NetworkBoundResource is using the local db as it's single source of truth.For example It starts by observing the database for Weather data. When the entry is loaded from the database for the first time, NetworkBoundResource checks whether the result is good enough to be dispatched or that it should be re-fetched from the network.
- Retrofit for consuming REST APIs
- Dagger2 for dependency injection
- Picasso for loading images from remote servers
- Facebook Shimmer library as loading animation
- Room as presistance library.
- Gson as data parser.
- RxAndroid for reactive components.
- Navigation component For navigation between fragments.