This repository contains a simple, single screen native Android comic details page viewer application powered by the Marvel Developer API (https://developer.marvel.com/).
Users will be presented with a page detailing a comic upon opening. There is a refresh button to query a random comic. Unfortuantely I couldn't find an API for getting a random list of comicIds from the Marvel API, so the application will query a random Id between 1 and 20,000. If the Id is found, the results will be cached in a local DB and displayed on the screen. If the results are not found, it is added to a database of invalid ids and the user can try again. Kind of like comic roulette. It was written using 100% kotlin and follows a semi MVVM architecture.
- Retrofit - Network calls (https://square.github.io/retrofit/)
- RxJava - Reactive functionality (http://reactivex.io/) or (https://github.com/ReactiveX/RxJava)
- Chuck - HTTP inspection (debugging) (https://github.com/jgilfelt/chuck)
- Dagger - Dependency injection (https://github.com/google/dagger)
- Glide - Image loading (https://github.com/bumptech/glide)
- Room - Interfacing with sqlite database (https://developer.android.com/training/data-storage/room/index.html)
- Stetho - More debugging (https://github.com/facebook/stetho)
- ktlint - Linting / code quality (https://ktlint.github.io/)
- Create a Marvel Developer account at https://developer.marvel.com/
- Pull down the project
- Create a keystore.properties file in the root directory
- Define MARVEL_API_PRIVATE_KEY and MARVEL_API_PUBLIC_KEY in the keystore.properties. These keys can be obtained from your Marvel developer account.
4a) MARVEL_API_PUBLIC_KEY = "<YOUR_PUBLIC_KEY_HERE>"
4b) MARVEL_API_PRIVATE_KEY = "<YOUR_PRIVATE_KEY_HERE>" - Build, run, and be super!
- Move more to dagger in the feature package such as the coordinator
- Write more robust tests, especially instrumentation
- Break more common logic into utils such as seen in the coordinator
- Dig deeper into the Marvel API to see if there's a better way to get a random comic.
- More features!