Modern News App is a simple news app 🗞️ which uses NewsAPI to fetch top news headlines for different categories from the API. The app is a guide to build Modern Android applications for all Android Developers. This repository includes improvements over the News App(1.0) repository.
The codebase focuses 👓 on following key things:
- Code structuring, style and comments
- Dependency injection 🗡
- Offline first
✈️ - Kotlin + Coroutines
- And best practices 🛠
- Time formatting of published date
- Detail Screen UI completion
- Search Functionality implementation
You'll need to provide API key to fetch the news from the News Service (API). Currently the news is fetched from NewsAPI
- Generate an API key (It's only 2 steps!) from NewsAPI
- Create new file named ->
credentials.properties
in our project root folder - Add the API key as shown below [Make sure to keep the double quotes]:
NEWS_API_KEY = "<INSERT_YOUR_API_KEY>"
- Build the app
- Enjoyyyyy 🎉
News App uses libraries and tools used to build Modern Android application, mainly part of Android Jetpack 🚀
- Kotlin first
- Coroutines and Flow first
- Architecture components
- Dagger Hilt for dependency injection 🗡
- Retrofit
- Other Android Jetpack components
The app uses MVVM [Model-View-ViewModel] architecture to have a unidirectional flow of data, separation of concern, testability, and a lot more.
Read more: