Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.
/ CryptoNews Public archive

Simple application showing latest cryptocurrency news, consuming cryptocontrol.io's API.

Notifications You must be signed in to change notification settings

mohandeath/CryptoNews

Repository files navigation

CryptoNews

CryptoNews is an Android application that retrieves the latest news about Cryptocurrencies from https://cryptocontrol.io/ and saves them to the database for the offline use.

This project was kind of a weekend project i've done for a technical assignment i've had and i thought it worths releasing. The main objective here is to showcase how to implement an offline-first application using MVVM + Reactive programming and also how to write some efficient unit tests for it. However, as a crypto fan, someties i openup the application myself to check the latest news 😁

Technologies:

  • Kotlin, App is written fully in Kotlin.
  • MVVM Architecture using lifecycle aware components + Repository Pattern
  • RxJava is used for reactive programming.
  • Dagger2 used for dependency injection
  • Retrofit used for Networking (+ Picasso for images)
  • Room for database persistent
  • Mockito+Junit4 used for Testing.

How to Build/Run app

  1. go to This address , sign up and get a free API KEY.
  2. put the API KEY into the build.gradle in the production flavor and build the project using this flavor! (there is also another flavor for staging which provides a mock response just to check the abilities of the application)
production {
            buildConfigField "String", "HTTP_BASE_URL", "\"https://cryptocontrol.io/api/v1/public/\""
            buildConfigField "String", "API_KEY", "\"PLACE-YOUR-API-KEY\""

        }

Improvements/Issues

  • **Lack of pagination : ** unfortunately the API used .for this app, in my opinion, is poorly designed and does not provide any pagination feature which make the responses very large. actually that's why i prefered to use Flowable in the repository.
  • More Unit Tests ; : i wrote some Tests for the Repository and the Viewmodel for news list, however there's a lot more to write in order to achieve the best test coverage ⚠️ This Project only focuses on the architecture and general code quality. however, in a real world application there are lots of things to do for the ui as well.

More information

Feel free to email me at [email protected] if you have any question/correction or any suggestions! Thanks.

Releases

No releases published

Packages

No packages published

Languages