Project Structure

  • dataSource : storage implementations
  • di : dependence injections configurations
  • model : application data models
  • network : configurations to create communications
  • repository : middleware between viewModels and data
  • ui : layouts implementations (activities/fragments)
  • worker : services that works in background

Libraries

App Description

Basically, the app configures all services and tries to start the WeatherWork (background service) as a PeriodicWork if it is not running yet.

The work will save the new weather obtained in local data storage. The view will get the weather from storage. All data are stored using SharedPreference because for this situation we need to save only last Weather but in case to improve the solution it is possible to change UserPreference to another likes Room, for example, inside DataStorageRepository.