Skip to content

Simple android application for newsapi.org written in Kotlin

Notifications You must be signed in to change notification settings

Alemoore/NewsApp

Repository files navigation

NewsApp

Simple android application for NewsAPI written in Kotlin using modern practices and tools such as:

  • MVVM Architecture
  • Android Jetpack (MVVM, LiveData, Navigation Component with Safeargs plugin)
  • Single-Activity Architecture
  • Dependency Injection using Dagger Hilt
  • Room 2
  • Retrofit 2
  • Coroutines
  • JUnit4 + Truth

If you want to run:

  1. Go to NewsAPI and generate an API key (it's 2 steps only)
  2. Put the API key at the gradle.properties file. Your line should look like this: API_KEY = "YOUR_API_KEY"
  3. Run the app

Architecture

The app uses ViewModel to abstract the data from UI and Repository as single source of truth for data. Repository fetches data for Breaking News fragment and Search News fragment from Web Service and fetches data for Saved News fragment from database. Detailed view of article opens in web-view. schema

Screenshots

Screenshot_20201124_172501 Screenshot_20201124_173200 Screenshot_20201124_173330 Screenshot_20201124_173407