Covid19 is an Android app that shows the latest information about the COVID19 pandemic. It uses modern Android development tools and practices to create a user-friendly and reliable app. This app is for Android developers who want to learn and improve their skills. 📱
- View the Total COVID19 cases worldwide from a reliable API source.
- Receive notifications of the total cases every hour using WorkManager.
- Search for COVID19 numbers for any country using Retrofit and Moshi.
- Visualize the statistics on linear charts using LiveData and DataBinding.
- Read COVID19 related news from the W.H.O. and Google News RSS using Coroutines and Flow.
- Access the app offline using Cache.
It uses PeriodicWorkManager
which is scheduled at the first run of an app. After that, Worker
will execute after every one hour of interval and will show notification on Android's system tray.
- Kotlin - The official and first-class programming language for Android development.
- Coroutines - For managing concurrency and asynchronous tasks.
- Flow - A cold asynchronous data stream that sequentially emits values and completes normally or with an exception.
- Android Architecture Components - Collection of libraries that help you design robust, testable, and maintainable apps.
- LiveData - Data objects that notify views when the underlying database changes.
- ViewModel - Stores UI-related data that isn't destroyed on UI changes.
- DataBinding - that allows you to bind UI components in your layouts to data sources in your app using a declarative format rather than programmatically.
- Koin - Dependency Injection Framework (Kotlin)
- Retrofit - A type-safe HTTP client for Android and Java.
- Moshi - A modern JSON library for Kotlin and Java.
- Moshi Converter - A Converter which uses Moshi for serialization to and from JSON.
- WorkManager - An API that makes it easy to schedule deferrable, asynchronous tasks that are expected to run even if the app exits or device restarts.
- Material Components for Android - Modular and customizable Material Design UI components for Android
com.elhady.covid19 # Root Package
.
├── data # For data handling.
│ ├── model # Model classes.
│ ├── local # Local Persistence Database.
| ├── remote # Remote Data Handlers for remote end point..
│ └── repository # Single source of data.
|
├── di # Dependency Injection
│ ├── builder # Activity Builder
│ ├── component # DI Components
│ └── module # DI Modules
|
├── ui # UI
│ ├── adapter # Adapters Package RecyclerView Adapter with ViewHolder
│ ├── binding # BindingAdapter
│ ├── view # Activity/View layer
│ │ ├── countries # Country Screen Activity & ViewModel
| │ │ ├─ Fragment # Fragment
| │ │ └─ viewmodel # ViewModel for Country Fragmnet
│ │ ├── faqs # Faqs Screen Fragment and ViewModel
| │ │ ├─ Fragment # Fragment
| │ │ └─ viewmodel # ViewModel for Faqs Fragmnet
│ │ ├── global # Global Screen Fragment and ViewModel
| │ │ ├─ Fragment # Fragment
| │ │ └─ viewmodel # ViewModel for Global Fragmnet
│ │ ├── news # News Screen Fragment and ViewModel
| │ │ ├─ Fragment # Fragment
| │ │ └─ viewmodel # ViewModel for News Fragmnet
│ │ ├── settings # Settings Screen Fragment and ViewModel
| │ │ ├─ Fragment # Fragment
| │ │ └─ viewmodel # ViewModel for Settings Fragmnet
│ │ ├── worker
| │ │ ├─ NotificationWorker # Worker class
| │ │ └─ NotificationWorkerManager # class manager
|
└── utils # Utility Classes / Kotlin extensions
This app follows the MVVM (Model View View-Model) architecture.
If you want to contribute to this project, please check the open issues and feel free to pick something up.
This app relies on these data sources:
Support it by joining stargazers for this repository. ⭐
And follow me for my next creations
Contributed By: islam elhady