Hechio / payoneer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Table of Contents

Prerequisite

This project uses the Gradle build system. To build this project, use the gradlew build command or use "Import Project" in Android Studio.

The App

A small app that loads and presents a list of payment methods like Visa, SEPA and PayPal for Payoneer customers. The app has one Activity that only act as entry point.

The project has been written in Java language. For network requests, it uses Retrofit with RxJava and Gson.

Dagger2 has been used for Dependency injection.

Architecture

The project is built using the MVVM architectural pattern and make heavy use of a couple of Android Jetpack components. Mvvm allows for the separation of concern which also makes testing easier. The MVVM pattern is shown in the diagram.

MVVM diagram

The first time the app is opened, the data will be fetched from the backend api service and stored locally in room. But if there is no internet or the api service is down, the data will be fetched from the local cache. This is handled in the repository class. ViewModel is basically responsible for updating the UI (Activity/Fragment) with the data changes. The ViewModel will initialise an instance of the Repository class and update the UI based with this data.

Testing

All tests are under the Android Test package. All the tests are run using JUnit.

ScreenShots

The app is available in both day and night theme.



Libraries

Libraries used in the whole application are:

  • Viewmodel - Manage UI related data in a lifecycle conscious way
  • Room - Provides abstraction layer over SQLite
  • RxJava - RxJava is a Java VM implementation of Reactive Extensions: a library for composing asynchronous and event-based programs by using observable sequences.
  • Dagger2 - Used for Dependency injection
  • Retrofit - Turns your HTTP API into a Java interface.
  • Mockito - Enables mock creation, verification and stubbing for testing
  • MockWebServer - A scriptable web server for testing HTTP clients
  • Glide - Media management and image loading framework for Android

Sample App and Source Code

Sample.App - Get APK debug app

Get it on Google Drive

Source.Code - Access to the project's github reporitory

About


Languages

Language:Java 100.0%