A | A |
---|---|
Our intern created a demo application that fetches a list of movies from an API, shows it and on click opens a detail screen for the given movie. Since he just started Android development the project does not follow the Android Best Practices or Material Guidelines.
It is up to you to bring the project and / or UI to a more senior level.
- Make the App runnable, List screen and detail screen should work.
- Setup Dependency Injection
- Migrate the network call from RxJava to Kotlin Coroutines
- Enhance the Movie List and detail screen by adding images
- Add Unit & UI Tests
- Fix code smells/bad usages that you see
PS: Feedback on the challenge is greatly appreciated, what did you like / don't like?
- refactoring is a very nice idea.
- Kotlin Coroutines
- Flow
- Hiding secretKeys in properties Files using gradle secrets
- Dependencies Versions & update plugin
- Dagger-Hilt
- Use Cases Approach
- Dependency inversion and SOLID
- Unit Testing using mockK, Kotest , turbine
- Ui Testing using Kaspresso
- Used functions rather than using interfaces
- Used data binding in adapter
- Moved repeated functions to ktx
- Add network call to
MoviesDetails
- Make the list Pagination work with the api using
Paging
library. - Integrate
Room
withRemoteMediator
withLocalDataSource
. - Make the
repository
fetch the data first -> cache it -> read from cache.
I didn't add pagination this time for lack of time for it, there was other things that were more important at the moment like the architecture and di.
- do it like this Video
- or add the dependency in
buildSrc/Libs
like thisconst val security_crypto: String = "androidx.security:security-crypto:_"
- then add it in
build.gradle.kts
of the app like thisimplementation(Libs.State.appState)
./gradlew refreshVersions
latest versions will be in versions.properties to select from.
token_header_name="Authorization"
base_url="https://api.github.com/"