
Interviews
Senior Android developer interview questions and answers (2026): 20 scenarios
Twenty senior Android interview scenarios across coroutines, Flow, Compose, Room, WorkManager and release safety, each with the question, the weak answer, a strong spoken answer, the follow-up that decides it and where senior reasoning ends and staff reasoning begins. Three come with a Kotlin reproducer: the bug first, then the fix.
By Mike Salari. Staff mobile engineer · 500+ technical interviews from the hiring side.
17 min read
A coroutine that outlives its screen, a Flow that continues collecting in the background, and a Compose row that remembers state belonging to a different item can all pass a happy-path demo. A Senior Android interview should expose those failures before a user does.
I am a Staff Mobile Engineer and Tech Lead with 15 years in mobile, and I have run 500+ technical interviews on the hiring side.
I do not score somebody higher for saying StateFlow, Room or WorkManager quickly. I listen for what remains true after cancellation, process death, a lost acknowledgement, or a release with old clients still installed. Google's offline-first architecture guidance is clear about a local data source for reads and explicit synchronisation work. It does not decide your domain's conflict policy. That decision belongs to the engineer explaining the system.
These 20 questions test a specific failure boundary each. If you practise them, answer the question before mentioning a framework, identify who owns the state, and say what you would measure. You are preparing to defend a design, not to recite a library catalogue.
I have conducted more than 500 technical interviews from the hiring side. Capable Android engineers rarely fail because they have never heard of a library. They fail more quietly. A correct mechanism is attached to the wrong owner. A durable write is described as a successful submission. Cancellation is confused with failure. The answer sounds solid, and nobody in the debrief can say what made it strong.
Do not fill that gap with an invented story. I cannot score the effort I assume happened offstage. I can score the decision you owned, the constraint that made it hard and the result you can defend without polishing away its limits.
The 20 scenarios at a glance
| Scenario | The question | The follow-up that decides it |
|---|---|---|
| 1. Coroutine cancellation | A repository request outlives its screen. What should cancel it? | What happens after the process dies? |
| 2. Coroutine exception propagation | One concurrent child fails. Should sibling work continue? | When is supervisorScope the wrong choice? |
| 3. Flow collection and lifecycle | Your UI collects a Flow while it is stopped. What changes? | What if no screen is collecting? |
| 4. StateFlow and one-time events | How should Compose display a payment error once? | What if the process dies before acknowledgement? |
| 5. Compose recomposition | A screen recomposes frequently. Is that a performance defect? | Which trace shows user-visible impact? |
| 6. State hoisting | Where should search filter state live? | What survives navigation or process recreation? |
| 7. Stable list identity | A LazyColumn item shows another row's expanded state. Why? | What if the server changes an item's identifier? |
| 8. Room as source of truth | Your app reads the server and Room. Which does the UI observe? | What happens when the server response is older than a local edit? |
| 9. WorkManager retries | How do you upload edits when connectivity returns? | What if the server succeeds but the acknowledgement is lost? |
| 10. Conflict resolution | Two devices edit the same checklist item offline. Who wins? | What if device clocks disagree? |
| 11. Paging and refresh | Why do users see duplicate feed cards after refresh? | How do you avoid a full refresh after every reconnect? |
| 12. Dependency injection boundaries | Would you inject a repository into every composable? | Where do you test the actual storage implementation? |
| 13. Process death | Your draft survives rotation but disappears after process death. Why? | What if the draft contains secrets? |
| 14. Background battery cost | Periodic synchronisation drains the battery. What changes? | What changes on metered networks? |
| 15. Deep link authentication | A deep link opens a private screen after logout. What should happen? | What if the link references content the user can no longer access? |
| 16. App start regression | Cold start became slower after adding analytics. How do you investigate? | What is your acceptable startup budget by device class? |
| 17. Crash clustering | Crashes spike only on one Android version. What do you do? | Can you remotely disable the failing path? |
| 18. Permissions and privacy | Should your feature request location permission at launch? | What if a user revokes permission while the app runs? |
| 19. Testing Compose interactions | How do you test a screen without tying tests to implementation? | Which failures can only be seen on a device? |
| 20. Release safety | A new feature fails after a phased rollout. How do you recover? | What if the new version wrote data the old version cannot read? |
One failure that connects four Android interview topics
Imagine an inventory screen. It collects a repository Flow, displays Room data, and starts a sync when connectivity returns. The user leaves the screen, the process dies, and the server successfully accepts a write but the acknowledgement never reaches the phone. When the app reopens, the list is visible from local storage and the pending operation is still in the outbox.
There are four separate questions here. The UI collector should follow the screen lifecycle. Persistent work should not depend on that collector. The local record should not disappear merely because a network request was interrupted. And retry should not create another logical mutation. Android recommends lifecycle-aware Flow collection and WorkManager for persistent work. Those are platform mechanisms, not proofs of exactly-once business effects.
For a strong interview answer, I want a concrete state machine: pending, in flight, acknowledged, rejected, and needs reconciliation. I want a stable operation ID persisted before scheduling work. The server either recognises that ID or provides a safe reconciliation contract. A transient network failure can retry with backoff. A domain validation failure cannot retry forever.
Now add Compose. The UI observes the local record and its sync state; it does not use the network callback as a second, competing source of screen truth. The user should see that an edit is saved locally but still waiting for confirmation. This is more useful than claiming the experience is always instant or consistent.
A Staff answer makes ownership explicit: mobile owns durable local capture and presentation; the API owns deduplication and authoritative acceptance; product owns conflict outcomes; release engineering owns exposure and rollback. No single dependency name explains that system.
1. Coroutine cancellation
Question: "A repository request outlives its screen. What should cancel it?"
Weak answer: "GlobalScope keeps work alive so it is safe."
Strong spoken answer: "I would assign the work to the appropriate lifecycle or feature scope and propagate cancellation. Work that must survive process death belongs in a durable scheduler, not a UI coroutine. I would verify that cancellation does not discard a committed write."
The bug, in code (ProfileRepository stands for any repository with a suspending fetch and a Flow.):
import androidx.lifecycle.ViewModel
import kotlinx.coroutines.DelicateCoroutinesApi
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.launch
class ProfileViewModel(private val repo: ProfileRepository) : ViewModel() {
val name = MutableStateFlow("")
@OptIn(DelicateCoroutinesApi::class)
fun load() {
// Nothing owns this coroutine. It keeps running after the screen
// is gone, and every call to load() starts another one.
GlobalScope.launch {
try {
name.value = repo.fetchName()
} catch (e: Exception) {
name.value = "Failed" // also catches CancellationException
}
}
}
}The fix gives the work an owner and lets cancellation through:
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import kotlinx.coroutines.CancellationException
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.launch
class ProfileViewModel(private val repo: ProfileRepository) : ViewModel() {
val name = MutableStateFlow("")
fun load() {
// viewModelScope is cancelled when the ViewModel is cleared.
viewModelScope.launch {
try {
name.value = repo.fetchName()
} catch (e: CancellationException) {
throw e // cancellation is not a failure: let it propagate
} catch (e: Exception) {
name.value = "Failed"
}
}
}
}Compiled with Kotlin 2.3.10 (Android Studio), kotlinx.coroutines 1.9.0 and AndroidX Lifecycle 2.8.7, warnings as errors.
Platform reference: Kotlin coroutine cancellation.
The next follow-up: "What happens after the process dies?" I want to see whether the candidate understands that an in-memory coroutine is not a durable job after process death.
Senior versus Staff: Staff defines durable work and product guarantees across app restarts.
2. Coroutine exception propagation
Question: "One concurrent child fails. Should sibling work continue?"
Weak answer: "I catch every exception and continue."
Strong spoken answer: "I would first decide whether the operations form one unit of work. In a normal structured scope, child failure affects siblings. Supervision can isolate failures when independence is intentional, but it requires explicit result handling."
The next follow-up: "When is supervisorScope the wrong choice?" This tests whether the candidate can distinguish independent sibling failures from a failure that must cancel the parent operation.
Senior versus Staff: Staff specifies partial-success semantics with the domain owner.
3. Flow collection and lifecycle
Question: "Your UI collects a Flow while it is stopped. What changes?"
Weak answer: "Flow automatically knows Activity state."
Strong spoken answer: "I would use lifecycle-aware collection at the UI boundary and keep the repository stream independent of the screen. I would test rapid stop and restart and ensure the chosen sharing strategy matches expected subscribers."
The bug, in code:
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.stateIn
class PriceViewModel(repo: ProfileRepository) : ViewModel() {
// Eagerly starts the upstream at once and never stops it.
// With no screen collecting, the app keeps polling until the ViewModel is cleared.
val price: StateFlow<Int> = repo.prices()
.stateIn(viewModelScope, SharingStarted.Eagerly, 0)
}The fix shares the stream only while a screen collects it:
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.stateIn
class PriceViewModel(repo: ProfileRepository) : ViewModel() {
// Upstream runs only while someone collects. The 5 second grace period
// keeps it alive through a rotation, so the stream does not restart.
val price: StateFlow<Int> = repo.prices()
.stateIn(viewModelScope, SharingStarted.WhileSubscribed(5_000), 0)
}Compiled with Kotlin 2.3.10 (Android Studio), kotlinx.coroutines 1.9.0 and AndroidX Lifecycle 2.8.7, warnings as errors.
Platform reference: Lifecycle-aware Flow collection.
The next follow-up: "What if no screen is collecting?" I am checking whether the candidate can explain what work continues at repository level when a UI collector stops.
Senior versus Staff: Staff defines whether important work persists independently of subscribers.
4. StateFlow and one-time events
Question: "How should Compose display a payment error once?"
Weak answer: "I put the error in StateFlow and clear it later."
Strong spoken answer: "I would separate durable screen state from transient effects and decide how a resumed screen should behave. For an error that must remain actionable, model it as state with acknowledgement. For one-off navigation, define delivery and loss rules explicitly."
The bug, in code:
import androidx.lifecycle.ViewModel
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
class CheckoutViewModel : ViewModel() {
private val _navigateToReceipt = MutableStateFlow(false)
val navigateToReceipt: StateFlow<Boolean> = _navigateToReceipt
fun onPaid() {
// StateFlow replays its latest value to every new collector.
// After a rotation the new screen sees true again and navigates twice.
_navigateToReceipt.value = true
}
}The fix sends the event once instead of storing it as state:
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.receiveAsFlow
import kotlinx.coroutines.launch
class CheckoutViewModel : ViewModel() {
// A buffered Channel delivers each event to one collector, once.
private val _events = Channel<String>(Channel.BUFFERED)
val events: Flow<String> = _events.receiveAsFlow()
fun onPaid(receiptId: String) {
viewModelScope.launch { _events.send(receiptId) }
}
}Compiled with Kotlin 2.3.10 (Android Studio), kotlinx.coroutines 1.9.0 and AndroidX Lifecycle 2.8.7, warnings as errors.
The next follow-up: "What if the process dies before acknowledgement?" This reveals whether a one-off event needs acknowledgement and whether losing the process changes its delivery guarantee.
Senior versus Staff: Staff treats event delivery as a user contract, not an API preference.
5. Compose recomposition
Question: "A screen recomposes frequently. Is that a performance defect?"
Weak answer: "Yes, any recomposition is bad."
Strong spoken answer: "I would measure actual frame work before changing state structure. Recomposition is normal; the question is whether expensive computation, unstable inputs or side effects occur in the wrong place. I would move work out of composition and inspect skipped work."
Platform reference: Compose state and recomposition.
The next follow-up: "Which trace shows user-visible impact?" I want evidence from composition tracing or profiling that the recomposition is actually causing user-visible work.
Senior versus Staff: Staff decides a performance budget and a repeatable regression test.
6. State hoisting
Question: "Where should search filter state live?"
Weak answer: "Always in the ViewModel."
Strong spoken answer: "I would place state at the lowest owner that needs to read or change it. Pure local expansion state may stay in a composable. Filters that affect repository queries and navigation likely need a longer-lived owner and explicit persistence behaviour."
The next follow-up: "What survives navigation or process recreation?" This separates view-local interaction state from saved state that can survive recreation or navigation.
Senior versus Staff: Staff aligns the persistence contract with product expectations.
7. Stable list identity
Question: "A LazyColumn item shows another row's expanded state. Why?"
Weak answer: "Compose has a bug with scrolling."
Strong spoken answer: "I would inspect item keys and state ownership. If rows shift but identity is positional, remembered local state can attach to the wrong logical item. I would supply stable domain keys and choose which row state belongs in the parent."
The next follow-up: "What if the server changes an item's identifier?" This tests the candidate's assumption about stable keys when backend identifiers are replaced or merged.
Senior versus Staff: Staff secures identity rules across API and client migrations.
8. Room as source of truth
Question: "Your app reads the server and Room. Which does the UI observe?"
Weak answer: "Always fetch the API when the screen opens."
Strong spoken answer: "I would make the repository expose local observable data and reconcile remote updates into Room for an offline-first requirement. I would distinguish freshness from correctness, display stale status when necessary and avoid two competing screen models."
Platform reference: Android offline-first data layer.
The next follow-up: "What happens when the server response is older than a local edit?" I am looking for version-aware merging so an old server response cannot overwrite an unacknowledged local edit.
Senior versus Staff: Staff defines merge precedence and recovery when reconciliation fails.
9. WorkManager retries
Question: "How do you upload edits when connectivity returns?"
Weak answer: "I retry in a loop until the API succeeds."
Strong spoken answer: "I would persist operations, schedule constrained durable work and classify failures. Transient errors can use bounded retries and backoff, while validation failures should stop and require user resolution. Every operation needs identity so retry does not duplicate a write."
The next follow-up: "What if the server succeeds but the acknowledgement is lost?" This probes idempotency and acknowledgement-loss recovery, not simply whether WorkManager retries.
Senior versus Staff: Staff establishes idempotency with the backend and a reconciliation protocol.
10. Conflict resolution
Question: "Two devices edit the same checklist item offline. Who wins?"
Weak answer: "The newest timestamp wins."
Strong spoken answer: "I would choose the policy from the meaning of the data. Last-write-wins can be acceptable for a low-stakes preference but dangerous for collaborative or financial records. I would preserve conflict context and provide a product-defined resolution when automatic merge is unsafe."
The next follow-up: "What if device clocks disagree?" This reveals whether the conflict rule depends incorrectly on device wall clocks.
Senior versus Staff: Staff negotiates authoritative versions and auditability across platforms.
11. Paging and refresh
Question: "Why do users see duplicate feed cards after refresh?"
Weak answer: "I deduplicate the adapter items."
Strong spoken answer: "I would inspect paging keys, remote mediator behaviour and stable item identity. The boundary between local storage and remote pagination must share ordering semantics. I would test insertion, deletion and refresh while the user remains scrolled."
The next follow-up: "How do you avoid a full refresh after every reconnect?" I want an incremental refresh strategy with explicit invalidation rather than a hidden full download on reconnect.
Senior versus Staff: Staff balances data freshness with bandwidth, backend limits and device battery.
12. Dependency injection boundaries
Question: "Would you inject a repository into every composable?"
Weak answer: "Yes, it makes mocking easier."
Strong spoken answer: "I would inject dependencies at a screen or feature boundary and pass state and events down where that keeps presentation simple. The goal is testable ownership, not a service locator in every leaf."
The next follow-up: "Where do you test the actual storage implementation?" This distinguishes unit-tested business policy from integration behaviour that only the real database can demonstrate.
Senior versus Staff: Staff defines unit, integration and contract coverage without duplicating every test.
13. Process death
Question: "Your draft survives rotation but disappears after process death. Why?"
Weak answer: "ViewModel keeps data forever."
Strong spoken answer: "A ViewModel survives particular configuration changes, not arbitrary process death. I would keep small restorable UI state in saved-state mechanisms and durable user drafts in persistent storage, then test a real recreation path."
The next follow-up: "What if the draft contains secrets?" I use this to test whether the persistence plan classifies sensitive fields rather than saving every draft by default.
Senior versus Staff: Staff considers encryption, retention and user expectations alongside recovery.
14. Background battery cost
Question: "Periodic synchronisation drains the battery. What changes?"
Weak answer: "I increase the polling interval a little."
Strong spoken answer: "I would remove unnecessary polling where push or event-driven refresh is sufficient, batch eligible work, respect scheduler constraints and measure wakeups and network cost. I would state acceptable staleness before choosing frequency."
The next follow-up: "What changes on metered networks?" This shows whether the candidate accounts for network policy, battery and user-visible freshness together.
Senior versus Staff: Staff agrees a network and energy budget with product and backend teams.
15. Deep link authentication
Question: "A deep link opens a private screen after logout. What should happen?"
Weak answer: "Navigation handles the route automatically."
Strong spoken answer: "I would validate the incoming intent, preserve only safe navigation context and require current authorisation before loading protected content. After sign-in, the app can resume the route if still valid. I would test tampered parameters and stale sessions."
The next follow-up: "What if the link references content the user can no longer access?" This tests the separation between a deep-link destination and authorisation to read its content.
Senior versus Staff: Staff connects client navigation to backend authorisation and threat modelling.
16. App start regression
Question: "Cold start became slower after adding analytics. How do you investigate?"
Weak answer: "Move all initialisation onto a background thread."
Strong spoken answer: "I would measure cold start on real devices, find work blocking first draw and split essential from deferrable initialisation. Some dependencies have ordering constraints; I would remove or defer work only after tracing those dependencies."
The next follow-up: "What is your acceptable startup budget by device class?" I am asking for a startup budget based on low-end devices, not the fastest development handset.
Senior versus Staff: Staff makes startup performance visible across SDK owners and releases.
17. Crash clustering
Question: "Crashes spike only on one Android version. What do you do?"
Weak answer: "Patch the crash and deploy immediately."
Strong spoken answer: "I would segment by OS, device, app version and feature exposure, reproduce the stack on a representative configuration and choose a mitigation with the smallest blast radius. I would monitor whether the intervention changes the affected cohort."
The next follow-up: "Can you remotely disable the failing path?" This tests whether a crash response includes a remotely controlled containment path with a safe default.
Senior versus Staff: Staff designs incident controls before the incident and owns staged exposure.
18. Permissions and privacy
Question: "Should your feature request location permission at launch?"
Weak answer: "Yes, so we can use it later."
Strong spoken answer: "I would request only when the user initiates an action that needs location, explain the purpose and provide a degraded path when access is denied. I would separately audit storage and transmission of the resulting data."
The next follow-up: "What if a user revokes permission while the app runs?" I want to know whether revocation is handled during use, not only at initial permission request.
Senior versus Staff: Staff sets privacy contracts that cross feature and analytics teams.
19. Testing Compose interactions
Question: "How do you test a screen without tying tests to implementation?"
Weak answer: "I assert every internal state property."
Strong spoken answer: "I would test user actions and visible semantics using stable identifiers where needed. Domain rules belong in ordinary unit tests, while composition and accessibility behaviour need UI tests. I would retain one realistic end-to-end path for navigation and persistence."
The next follow-up: "Which failures can only be seen on a device?" I ask this to distinguish semantics tests from device-only issues such as focus, accessibility and input timing.
Senior versus Staff: Staff balances execution cost against platform integration risk.
20. Release safety
Question: "A new feature fails after a phased rollout. How do you recover?"
Weak answer: "I publish the previous APK."
Strong spoken answer: "I would halt exposure, use a feature gate where it safely disables entry, investigate server and local data compatibility and measure recovery by affected cohort. A new release may not reach installed users immediately, so I would plan backwards-compatible state."
The next follow-up: "What if the new version wrote data the old version cannot read?" This exposes the backward-compatibility cost of persistent writes made before a rollback.
Senior versus Staff: Staff owns the release contract across mobile and backend teams.
A reproducible answer beats twenty memorised definitions
For each scenario, write a failure test before you write a solution. In cancellation, specify the parent and child scopes. For Flow, show which lifecycle state allows collection. For Compose, identify the state owner and item key. For Room, state which write survives process death. For WorkManager, make a lost acknowledgement the first retry test. A diagram of ownership and one adversarial test tell me more than a list of recommended libraries.
Rehearse the decision, not the library name
Record the owner, lifetime, failure and evidence for three scenarios. For durable sync, verify that a process restart preserves a queued operation and that retries preserve its identity.
Explain what the user sees before naming WorkManager or StateFlow.
Change the constraint: a user signs out with a pending write, the response is duplicated or the process dies. Check whether the promise still holds without exhausting battery or network resources.
A Staff answer might remove a redundant data owner instead of adding components. It must defend the user promise and its cost.
Do not invent interview evidence.
Related interview guides
The shorter list is the 5 follow-ups that decide a senior Android loop. If scenarios 1 to 4 were the hard ones, ten Kotlin coroutines questions goes deeper on that topic alone. The design round has its own worked answer in the Android system design interview, and the iOS version of this page is senior iOS developer interview questions and answers.
Questions engineers ask about senior Android interview questions
What do senior Android interviewers listen for?
What remains true after cancellation, process death, a lost acknowledgement, or a release with old clients still installed. Naming StateFlow, Room or WorkManager quickly does not score higher than explaining who owns the state and what you would measure.
How should I practise these 20 scenarios?
Write a failure test before you write a solution. For cancellation, specify the parent and child scopes. For Flow, show which lifecycle state allows collection. For Compose, identify the state owner and item key. For Room, state which write survives process death. For WorkManager, make a lost acknowledgement the first retry test.
Is a ViewModel enough to keep a draft after process death?
No. A ViewModel survives particular configuration changes, not arbitrary process death. Keep small restorable UI state in saved-state mechanisms and durable user drafts in persistent storage, then test a real recreation path.
The follow-up question behind this one is the subject of The Senior Signal.


