Skip to content

An Android application consuming information about the current Bitcoin market price from Blockchain api

Notifications You must be signed in to change notification settings

abassawo/BitcoinTracker

Repository files navigation

Bitcoin Tracker

  1. Overview
  2. Cloning the Project
  3. Building
  4. Testing
    1. Unit Tests
  5. Architecture
    1. Model-View-Presenter
    2. Base Classes
    3. Third Party Libraries

Overview

The project contains the following components:

  • Ktx (Kotlin synthetic properties for more efficient view binding), Extension functions
  • Android Design Library
  • MPAndroidChart for displaying charts
  • Commonly used third party dependencies (RxJava, retrofit, etc))
  • Other setups to support performance and dependency injection (dagger, custom Application, Timber, etc)

Cloning the project

To check out the source, simply download/clone the repo

Building

This project does not require any additional setup or special configurations to build or run.

Configurations

  • There are 2 different build types - Debug, and Release. Main difference between the two is Debug build is eligible for logging via timber. Release build will also require generated keystore file.

Testing

Unit Tests

Unit tests exist under the "test" directory.

Architecture

Model-View-Presenter

The app uses the popular MVVM architecture to allow for separation of logic and ease of testing. In this paradigm, all business logic should live inside presenters (but they can delegate some tasks to other classes that are injected as dependencies). Activities and fragment will act as "views", they should not have any logic other than passing the user events to the presenter and displaying the data. There are also Contract classes that specify the communication interface between the views and presenters.

Base Classes

  • BaseMvpActivity: Base class for activities. Includes setup for interactions with presenter.
  • BaseMvpFragment: Basically the same as BaseMvpActivity, but for fragments.
  • BasePresenter: Base class for all presenters. Includes lifecycle setup and common dependencies. Goes along with BaseMvpActivity and BasMvpFragment.
  • BaseContract: Includes interfaces that all views and presenters should implement.

Third Party Libraries

  • RxJava/RxAndroid (helps with asynchronous event handling)
  • Retrofit/OkHttp (simplifies network requests)
  • Timber (better logging tool)
  • Mockito (mocks out classes for tests)

Preview

Imgur Bitcoin Tracker

About

An Android application consuming information about the current Bitcoin market price from Blockchain api

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages