/modern-news-app

News App using dagger hilt and clean architecture principles

Primary LanguageKotlin

[ 🚧 Work in progress 👷‍♀️⛏👷🔧️👷🔧 🚧 ] News App(2.0)

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 🛠
NewsApp Main Page NewsApp Detail Page

TODO

  • Time formatting of published date
  • Detail Screen UI completion
  • Search Functionality implementation

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
  • 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 🎉

Libraries and tools 🛠

News App uses libraries and tools used to build Modern Android application, mainly part of Android Jetpack 🚀

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