RepositoryKotlin
AB

abhinav272/NewsApp

A Sample News App written in Kotlin using Android Architecture Components, MVVM

186stars
59forks
2issues
0views

Android Architecture Sample

Android Architecture Components were announced in Google I/O 2017 This is just a sample app explaining the new Architecture Guidelines written in Kotlin. This sample app is powered by NewsAPI.

Components Used

About App

This app uses NewsAPI to get various sources and each source can provide major headlines. It uses Retrofit 2 to fetch news sources and news headlines from the API and displays in a RecyclerView. It uses Room Persistence Library to provide offline functionality App first loads the data from DB and then checks for fresh data from API, API is only called if DB data is empty or expired The main aim of this sample app is show how to use the new Architecture Guidelines with Kotlin.

If you want to run:

  • Go to NewsAPI and generate an API key (It's only 2 steps!)
  • Put the API key at the bottom of the gradle.properties newsAPIKey = "YOUR_API_KEY"
  • Run the app

Architecture

The app uses ViewModel to abstract the data from UI and Repository as single source of truth for data. Repository fetch the data from database and shows, while also checks if the data is old. If the data is old or database does not contain any data (such as first launch) it fetches data from Web Service and saves the data into database.

Architecture


Screenshots

NewsApp Main Page NewsApp Main Page NewsApp Main Page

Future Roadmap

  • Room Persistence Library for offline support
  • Support for Launguage, Country and Category selection
  • Write test cases

Proudly :muscle: made in Kotlin

License


The MIT License (MIT)

Copyright (c) 2017 Abhinav Sharma

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Similar Projects

Discover other similar projects and AI models.

RepositoryKotlin
PatilShreyas/Foodium

🍲Foodium is a sample food blog Android application 📱 built to demonstrate the use of Modern Android development tools - (Kotlin, Coroutines, Flow, Dagger 2/Hilt, Architecture Components, MVVM, Room, Retrofit, Moshi, Material Components).

2.3k
Mar 20, 2026
RepositoryKotlin
Quyunshuo/AndroidBaseFrameMVVM

基于 Jetpack + Kotlin 的 Android 组件化 MVVM 框架

1.3k
Sep 23, 2023
RepositoryKotlin
square/leakcanary

A memory leak detection library for Android.

30.0k
Nov 26, 2026
RepositoryKotlin
Heapy/awesome-kotlin

A curated list of awesome Kotlin related stuff Inspired by awesome-java.

11.4k
Nov 29, 2026
RepositoryKotlin
AkshayChordiya/News

A sample News 🗞 app built using Modern Android Development [Architecture Components, Coroutines, Retrofit, Room, Kotlin, Dagger]

845
Nov 3, 2020
RepositoryKotlin
mayokunadeniyi/Instant-Weather

An Android weather application implemented using the MVVM pattern, Retrofit2, Dagger Hilt, LiveData, ViewModel, Coroutines, Room, Navigation Components, Data Binding and some other libraries from the Android Jetpack.

761
Jul 11, 2026
RepositoryKotlin
ferPrieto/SpaceX-prepare-for-Clean-Architecture-liftoff

Feature-first Clean Architecture Android Project

752
Dec 28, 2025
RepositoryKotlin
ZahraHeydari/Android-Clean-Architecture-MVVM-Hilt-RX

Implemented by Clean Architecture, Hilt, MVVM, LiveData, RX, Retrofit2, Room, Anko

447
Jul 27, 2023
RepositoryKotlin
jenly1314/MVVMFrame

🏰 MVVMFrame 是一个基于Google官方推出的JetPack构建的快速开发框架。从此构建一个MVVM模式的项目变得快捷简单。

415
Sep 18, 2026