News App is a simple news app 🗞️ which uses NewsAPI to fetch top news headlines from the API and also search for mews based on user query. The main aim of this app is to be a leading example for best pratices in morden android development architecture and also for a sample project
The codebase focuses 👓 on following key things:
- ViewBinding
- Navigation Components using Fragments
- LiveData & ViewModel
- Dagger2 + Hilt - dependency injection
- Retrofit
- Room
- Paging3, PagingDataAdapter, LoadStateAdapter
- RecyclerView, ListAdapter
- GSON
- Kotlin Flow
- Material Design
- Kotlin Coroutines
- Clean code with Tests
- Firebase Crashlytics
The idea is to keep the app super simple while demonstrating new libraries and tools which makes it easier to build high quality Android applications.
You will require latest version of Android Studio 3.0 (or newer) to be able to build the app
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
- Add the apiKey as a value in your
local.properties
API_KEY = "<INSERT_YOUR_API_KEY>"
- Build the app
- Good Luck 🎉
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:
Some features that needs to be enhanced but didnt due to lack of time
- Pager Integration in Api response
- BackPress in SearchView
- Loading Animation
Emmanuel Iyke
This project is licensed under the Apache License 2.0 - See: http://www.apache.org/licenses/LICENSE-2.0.txt