/MVIMarvelApp

Android project using MVI architecture pattern.

Primary LanguageKotlin

MARVEL-APP MVVM-MVI

CI Language

This project is an APP developed to show the Marvel characters information using the open Marvel API.

Main features:

This app lets you to:

  1. Show character list
  2. Show error view with Retry button (only shown when there is no data)
  3. Pagination when user gets recyclerView's bottom
  4. Character Detail fragment
  5. Search Characters (when user writes a name in searchView requests data with a bounce of 500ms)
  6. Save/Remove Favorite Characters
  7. Get Favorite Characters

Architecture

Languages, libraries and tools used

IMPORTANT Api Keys

To avoid making the Marvel ApiKeys public, the file keys.properties must be added to the root directory. This contains your keys to consume MarvelAPI:

api.key="PUBLIC_KEY"
api.private_key="PRIVATE_KEY"

To avoid having to add the authentication parameters in each request, we have created an ApiParamsInterceptor. Here we add these params:

.addQueryParameter(PARAM_API_KEY, BuildConfig.API_KEY)
.addQueryParameter(PARAM_HASH, generateHash(timestamp))
.addQueryParameter(PARAM_TS, timestamp.toString())

ScreenShots

Unit Tests

Added UnitTests to check:

  • DataSources (NetworkDataSource & diskDataSource)
  • Repositories
  • UseCases
  • ViewModels
  • Check request url
  • Check request parse data

Espresso Tests

  • MainActivity
  • DetailActivity

Dependency updates

Added this plugin to check dependency updates (https://github.com/ben-manes/gradle-versions-plugin)

  • To check if there are new version you only have to run ./gradlew dependencyUpdates