Android architecture and DI interview questions
Layers, unidirectional data flow, MVVM and MVI, repositories, Hilt and modularisation for apps that keep growing.
– interview-ready · 15 questions in this topic
– of 15 tried
Saved on this device. Interview-ready means you got it right on two different days. Guesses and hints count for less.
Questions
- UI, domain and data layersPick the fix
- Unidirectional data flow and UiStateOrder the steps
- MVVM vs MVIPick the fix
- Repositories and a single source of truthPick the fix
- Use cases and the domain layerPick the fix
- Dependency injectionPick the fix
- Hilt basicsFill the blank
- Hilt components and scopesPick the fix
Practise this topic
Flashcards · 20
Flip, then say if you knew it. Needs JavaScript; every answer is also on its question page.
Quick quiz · 15 questions
One exercise per question, checked as you go. Needs JavaScript.
Mock interview · 3 sets
Timed, out loud, then tick what you covered. Needs JavaScript.
Quick facts
Recall the answer first, then tap Show to check.
@HiltAndroidApp
@HiltAndroidApp on the Application class triggers Hilt's code generation and creates the app-level component.
hiltViewModel()
hiltViewModel() returns a Hilt ViewModel scoped to the current navigation entry or Activity.
Convention plugins
Convention plugins in an included build-logic build share Gradle configuration across modules.
Now in Android
Google's Now in Android sample app shows the recommended layers and modularisation.
ActivityRetainedComponent
ActivityRetainedComponent lives across configuration changes, like a ViewModel.
Printable cheat sheet · Review your weak spots in this topic
Share your progress
Sources: Question outline adapted from Android-Interview-Questions by Mohsen Mirhoseini, licensed under Apache 2.0. We reorganised the questions, rewrote every answer and added new ones. Credits and license