This project is an APP developed to show the Marvel characters information using the open Marvel API.
This app lets you to:
- Show character list
- Show error view with Retry button (only shown when there is no data)
- Pagination when user gets recyclerView's bottom
- Character Detail fragment
- Search Characters (when user writes a name in searchView requests data with a bounce of 500ms)
- Save/Remove Favorite Characters
- Get Favorite Characters
- Kotlin
- Hilt-Dagger
- Kotlin-Coroutines + Flow
- ConstraintLayout
- LiveData
- Android View Binding
- Android Architecture Components
- Retrofit
- OkHttp
- Moshi
- Room
- Picasso
- Mockk
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())
Added UnitTests to check:
- DataSources (NetworkDataSource & diskDataSource)
- Repositories
- UseCases
- ViewModels
- Check request url
- Check request parse data
- MainActivity
- DetailActivity
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