Android Developer Interview Guide: Kotlin, Jetpack Compose, and Architecture Patterns
Android interviews test Kotlin proficiency, Android framework knowledge, architecture patterns, and modern Jetpack components. Whether you're targeting Google, a consumer app company, or a scale-up with Android-heavy traffic, here's the preparation roadmap.
Kotlin Essentials
Null safety: Kotlin's type system distinguishes nullable (String?) from non-null (String). Null safety at compile time. Safe call operator (?.), Elvis operator (?:), not-null assertion (!! — avoid in production).
Coroutines: Kotlin's concurrency model. suspend functions run asynchronously without blocking threads. Launch with CoroutineScope.launch (fire-and-forget) or async/await (for values).
viewModelScope.launch {
val result = withContext(Dispatchers.IO) {
repository.fetchData() // IO-bound work off main thread
}
// Back on main thread
_uiState.value = result
}
Flow: Cold observable streams. StateFlow for state (always has a value, replays to new collectors). SharedFlow for events (configurable replay). Replace LiveData in modern codebases.
Extension functions, data classes, sealed classes: Know these deeply — they're ubiquitous in idiomatic Kotlin. Sealed classes for modeling sum types (Result, UiState).
Jetpack Compose vs. Views
Traditional Views: XML layouts, ViewGroups, View recycling. Imperative — you manipulate views directly. Still dominant in existing codebases. Key APIs: RecyclerView with DiffUtil, ViewBinding, ConstraintLayout.
Jetpack Compose: Declarative UI, composable functions, recomposition. State drives UI. Modern approach for new projects targeting Android 5.0+.
@Composable
fun UserCard(user: User, onTap: () -> Unit) {
Card(modifier = Modifier.clickable(onClick = onTap)) {
Row {
AsyncImage(model = user.avatarUrl, ...)
Text(text = user.name)
}
}
}
State in Compose: remember for local state surviving recomposition. rememberSaveable for state surviving configuration changes. collectAsStateWithLifecycle for collecting ViewModel Flows.
Architecture
MVVM with ViewModel: Google's recommended pattern. ViewModel survives configuration changes (screen rotation). Exposes StateFlow/LiveData for UI to observe. UI layer only handles display logic; ViewModel handles presentation logic; Repository handles data.
MVI (Model-View-Intent): Unidirectional data flow. User intents → ViewModel processes → emits new state → UI renders. Popular for complex screens where state transitions need to be explicit and testable.
Repository pattern: Abstracts data sources. ViewModel calls repository; repository decides whether to serve from cache, Room database, or network. Decouples data source details from business logic.
Room Database
Room is Android's SQLite abstraction. Key components: @Entity (table), @Dao (data access object with suspend queries), @Database (database builder).
@Dao
interface UserDao {
@Query("SELECT * FROM users WHERE id = :userId")
suspend fun getUser(userId: String): User?
@Query("SELECT * FROM users")
fun observeAllUsers(): Flow<List<User>> // Cold flow, updates on table changes
@Insert(onConflict = OnConflictStrategy.REPLACE)
suspend fun insertUser(user: User)
}
Activity and Fragment Lifecycle
Still tested, even in Compose-heavy codebases. Key states: onCreate, onStart, onResume, onPause, onStop, onDestroy. The classic question: "What's the difference between onStop and onPause?" onPause: activity partially visible or another activity in foreground. onStop: activity completely hidden.
Configuration changes: Screen rotation recreates the Activity. ViewModel survives this (it's retained across config changes). savedInstanceState for small amounts of state that must survive process death.
Fragment backstack: FragmentManager manages the backstack. Know the difference between add (keeps existing fragment) vs. replace (removes current fragment) transactions.
Performance and Testing
Strict mode: StrictMode.setVmPolicy and StrictMode.setThreadPolicy detect accidental disk reads on the main thread, leaked SQLite cursors. Enable during development.
Profiling: Android Studio's CPU, Memory, and Network profilers. Identify main thread jank (frame drops), memory leaks with the Memory Profiler and LeakCanary.
Unit testing: Test ViewModels with kotlinx-coroutines-test (runTest, TestCoroutineDispatcher). Test Room with an in-memory database (Room.inMemoryDatabaseBuilder). Test composables with ComposeTestRule.
Common Interview Questions
"How do you handle background work?" — WorkManager for guaranteed background work (sync, cleanup). Coroutines for in-process async. Foreground service for long-running user-visible work (music, navigation).
"How do you share data between fragments?" — Shared ViewModel scoped to the Activity or a Navigation back stack entry. Avoid Fragment-to-Fragment direct calls.
"How do you handle deep links?" — NavDeepLinkBuilder with Jetpack Navigation. Define deep link patterns in the navigation graph.
Prepare one substantial Android project you've shipped — its architecture, the technical decisions you made, what you'd do differently. That concrete example grounds abstract Android knowledge in real experience.
Don't neglect behavioral preparation — see our behavioral interview guide.
For technical interview preparation, our system design guide is essential reading.
Your resume is the first impression — get it right with our resume guide.
When offers arrive, consult our salary negotiation guide.
{
"@context": "https://schema.org",
"@type": "BlogPosting",
"headline": "Android Developer Kotlin, Jetpack Compose, and...",
"description": "Prepare for Android developer interviews — Kotlin, Jetpack Compose vs Views, MVVM/MVI, Coroutines, Room, and common Android interview questions.",
"datePublished": "2026-03-20",
"author": {
"@type": "Organization",
"name": "CodeSwiftr Team"
},
"url": "https://codeswiftr.com/blog/android-developer-interview-guide"
}
Related Reading
- AI Interview Practice Tools Comparison
- Amazon Leadership Principles Interview Guide
- C Plus Plus Interview Guide
- Cpp Systems Programming Interview Guide
- Elixir Phoenix Interview Guide
Elevate your prep with AI. Practice your technical interviews with CodeSwiftr and get real-time feedback on your delivery, STAR method compliance, and technical depth.
Explore Related Topics
- Express.js and Node.js Middleware, Performance, and...
- Functional Programming Pure Functions, Immutability, and...
- Go Advanced Concurrency, Runtime, and Production Patterns
Related Guides
- System Design Interview Guide
- Amazon Leadership Principles Interview Questions
- Behavioral Interview Star Method
Ready to practice? Start your free mock interview on CodeSwiftr.
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [
{
"@type": "Question",
"name": "What are the most important topics for Android developer interviews in 2026?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Android developer interviews in 2026 focus heavily on Jetpack Compose (declarative UI, recomposition, state management), Kotlin Coroutines and Flow (suspend functions, StateFlow, SharedFlow, structured concurrency), modern Android architecture (MVVM with ViewModel, Clean Architecture with Use Cases, Repository pattern, Hilt/Dagger2 dependency injection), and Jetpack libraries (Room, Navigation, WorkManager, DataStore). Older topics like AsyncTask and ContentProviders still appear but are declining. Knowledge of Android performance profiling (CPU profiler, Memory profiler, LeakCanary) and testing (JUnit4, Espresso, ComposeTestRule) rounds out the strong candidate profile."
}
},
{
"@type": "Question",
"name": "What is the difference between StateFlow and SharedFlow in Kotlin?",
"acceptedAnswer": {
"@type": "Answer",
"text": "StateFlow and SharedFlow are both hot flows but serve different purposes. StateFlow is designed for state representation — it always holds a current value, replays that value to new collectors, and requires an initial value. It replaces LiveData in modern Android codebases. SharedFlow is designed for events — it has configurable replay cache (default 0, meaning new subscribers don't receive previous emissions), making it suitable for one-time events like navigation commands or snackbar displays. The practical rule: use StateFlow for UI state (loading, content, error), use SharedFlow for UI events (navigation, toasts). Both are thread-safe and work naturally with viewModelScope."
}
},
{
"@type": "Question",
"name": "How do Android interviews evaluate Jetpack Compose knowledge?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Compose knowledge is tested through conceptual questions and often a live coding exercise. Key concepts: the declarative UI model (composable functions, recomposition triggered by state changes), state hoisting (moving state up to parent composables for testability and reuse), remember vs. rememberSaveable (the latter survives configuration changes), LaunchedEffect and SideEffect for lifecycle-aware operations, and Composition Local for passing data through the tree without explicit parameters. Interviewers also test Compose performance awareness: using keys in lazy lists, avoiding unnecessary recompositions with derivedStateOf, and understanding the Composition/Layout/Drawing phases."
}
},
{
"@type": "Question",
"name": "What salary can Android developers expect at top tech companies?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Android developer salaries at top tech companies: Google (the home of Android itself) pays senior Android engineers $250,000-$380,000 total comp. Meta and Snap (both heavy Android investment) pay similarly. Mid-size companies (Spotify, Lyft, DoorDash) pay senior Android engineers $200,000-$300,000. Startups vary widely — $150,000-$250,000 with equity upside. Android specialization is valued but slightly less broadly demanded than iOS, which tends to give iOS engineers a marginal compensation premium at Apple and consumer-focused companies. Strong Compose skills are increasingly a differentiator as companies migrate from Views."
}
}
]
}