Skip to content

ranjithnaidu/Android-Playbook

Repository files navigation

Android-Playbook

This project demonstrates the app architecture of a master-detail user flow on android.

All the endpoints used by the app are given below:
What's the app about?

The app displays a list of posts and allows the user to click on it by opening a bottom sheet with the following details:

  • Post Title (This is supplied from the master list)
  • Post Body (This is a description of the post and is also supplied from the master list)
  • Number of Comments for the post (This is loaded from the api upon opening the page)
  • Author name (This is also loaded from the api upon opening the page)

Please find the Screeshots below:

Screenshot_1558520659 Screenshot_1558520670 Screenshot_1558520666

App Architecture

This app is entirely written in Kotlin.

MVVM has been used in the app to keep the business logic away from the activities and fragments. LiveData and Data Binding was used as required to bind the views and data elements. Repository layer has been partially implemented in order to handle data operations especially with comments and authors endpoints where a huge chunck of data is given by the API not fully required by the viewModels.

Koin is used for Dependency injection (Dagger2 could also be used here)

The job of services is to interact with the apis and convert the responses into models which can be used by the rest of the app.Retrofit2, Okhttp and RxJava Adapter has been used to automatically convert the api responses into Rx observables.

Junit and nhaarman's mockito-kotlin library has been used for Unit-testing.

For any queries please contact ranjithnaidu.v@gmail.com