Skip to content

A sample news app which demonstrates clean architecture and best practices for developing android app using MVVM Architecute

Notifications You must be signed in to change notification settings

EmmanuelDav/NewsApp

Repository files navigation

News App 🗞

[GitHub license]

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:

  1. ViewBinding
  2. Navigation Components using Fragments
  3. LiveData & ViewModel
  4. Dagger2 + Hilt - dependency injection
  5. Retrofit
  6. Room
  7. Paging3, PagingDataAdapter, LoadStateAdapter
  8. RecyclerView, ListAdapter
  9. GSON
  10. Kotlin Flow
  11. Material Design
  12. Kotlin Coroutines
  13. Clean code with Tests
  14. 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.

Development Setup 🖥

You will require latest version of Android Studio 3.0 (or newer) to be able to build the app

API key 🔑

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 🎉

ScreenShots


Architecture

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:

Architecture

TODO

Some features that needs to be enhanced but didnt due to lack of time

  1. Pager Integration in Api response
  2. BackPress in SearchView
  3. Loading Animation

Author

Emmanuel Iyke

License

This project is licensed under the Apache License 2.0 - See: http://www.apache.org/licenses/LICENSE-2.0.txt

About

A sample news app which demonstrates clean architecture and best practices for developing android app using MVVM Architecute

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages