This is a project to learn several things of android development. It uses Kotlin with MVVM architecture and based on best practices by Android docs. The premise is a trivia app that uses old jeopardy questions to test your knowledge!
These are goals for this project:
- Consume remote datasource (external api) with Retrofit
- Set up Circle CI build with Code Cov (current)
- Setup Firebase crasylytics and Test Lab
- Unit testing with Mockk and InstrumentedTesting with Robolectric (current)
- Material Design principles/ A11y
- Add plugins to build: Detekt, Ktlint
- Add pre-git hook for auto running plugins
- Push notifications for questions and custom actions on notification (answer question from notification)
- Upgrade gradle to use Kotlin DSL and buildSrc
- Break functionality into modular approach
- Themes and Storing user preferences
- Room database with user scores and answered questions for analytics
There is nothing special to this build at the moment.
- Gradle -> 6.1.1 which is latest at this moment.
- Kotlin -> 1.4.10
- Android -> target SDK 30 (Android 10)
to build just clone and click build or from cli: .\gradlew build in root directory of project
This is a MVVM approach to our app. It also uses the concept of on Activity (Main) and navigates between fragments (Question and Category)
Currently there is only one module: App, which contains all content for the app.
-
Jetpack:
- Android KTX - kotlin jetpack
- Data Binding - binding variable values from view model to ui
- View Binding - creates instances of view so that you can avoid doing: findViewById
- LiveData - data that is aware of the lifecycle of fragments and activities
- Navigation - uses nav graph to simplify app flow
-
Coroutines - used for 'async' and to manage background threads safely
-
Dagger-hilt - DI replacement for Dagger 2. Simplifies it A LOT
-
Moshi - json converter/parser
-
Retrofit - http client
- Junit - unit test framework.
- Mockk - alternative to Mockito that was made for Kotlin first
- View Binding how-to
- Retrofit how-to
- Jeopardy api Docs for api
- Moshi Codegen Why to include moshi codegen