tochukwumunonye / EiffelNews

A news Application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EiffelNews

A news Application built with offline-First Architecture. The application fetches new from various news sources and stores in the android database. The android database serves as a single source of truth which means it provides the whole app with data and prevents conflicts in data. The application always displays data from the database, which prevents blank screen incase there is no internet connection. Another Importance of offline caching is that it prevents excessive battery drainage since making too much network connection kills battery quickly.

Preview

EiffelNews is a demo application that uses MVVM pattern and Android Jetpack: the Pagging 3 library with a backend API, Saved State module for ViewModel, LiveData, ViewBinding, Room, Dagger-Hilt and Navigations Components. The app fetches data from the network with use of Retrofit integrating persisted data in the database via repository pattern. The app also uses and Kotlin Coroutines + Flow. Eiffel News functions efficiently even when network is flaky.

Tech stack & Open-source libraries

Jetpack components:

  • Paging 3 sets up a Repository that will use the local database to page in data for the UI and also back-fill the database from the network as the user reaches to the end of the data in the database.
  • Room Persistence - Access app's SQLite database with in-app objects and compile-time checks.
  • ViewBinding - allows to more easily write code that interacts with views and replaces findViewById.
  • Saved State module for ViewModel data that survives background process restart.
  • Lifecycles - Create a UI that automatically responds to lifecycle events.
  • SafeArgs for navigating and passing data between fragments.
  • Room - Access app's SQLite database with in-app objects and compile-time checks.
  • Android Jetpack - Suite of libraries, tools, and guidance to help developers write high-quality apps easier.
  • Glide - A fast and efficient open source media management and image loading framework for Android.
  • Google Play Core - Offers a runtime interface with the Google Play Store.
  • GSON - Java library that can be used to convert Java Objects into their JSON representation.
  • Hilt - Library that provides a standard way to incorporate Dagger dependency injection into an Android application.
  • Kotlin Coroutines - Concurrency design pattern used on Android to simplify code that executes asynchronously.
  • Retrofit 2 - A type-safe HTTP client for Android and Java.
  • Timber - Logger with a small, extensible API which provides utility on top of Android's normal Log class. .

Architecture:

  • MVVM Architecture
  • Repository pattern

Features

  • Picking categories.
  • Opening an article's web site,
  • Sharing and article link,
  • Supporting landscape mode.

Open API

EiffelNews uses the NewsApi for constructing RESTful API. Obtain your free API_KEY NewsApi and paste it to the Constants file to try the app.

License

License

Copyright 2020 Tochukwu Okey-Munonye

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Author

  • Okey-Munonye Tochukwu

About

A news Application


Languages

Language:Kotlin 100.0%