© Interview RuntimeThis content is copyright. Copying is disabled; you may quote a short excerpt with a link to the page.

Senior Android interview practice for answering out loud, taking the follow-up and retrying

8 senior Android prompts on lifecycle, coroutines, Flow, Compose, persistence and background work, practised out loud with a follow-up and a retry.

Engraving of a metronome with its arm mid-swing.

In short

  • Naming an API is not the same as justifying its behaviour under process death, cancellation or a late response.
  • A ViewModel survives configuration change. It does not survive process death, so name what must be restored.
  • Choose the failure relationship between coroutines from the feature's contract, not from habit.
  • Saved state holds small IDs. Work the user would hate to lose needs persistence.
  • Retry each prompt after a changed condition, then compare the new answer with your first recording.

“The ViewModel survives rotation.”

Correct. Now the process is gone. What reconstructs the screen, and where is the user's unsent change?

Senior Android interview practice is less about naming the API than about justifying its behaviour under hard conditions such as process death, cancellation, a late response or a retried write. A useful answer connects an API's guarantee to the lifetime, failure or user behaviour in the prompt.

This article turns 8 senior Android prompts into a practice loop. They cover coroutines and their failure rules, Flow, Compose, lifecycle and process death, persistence and background work. They are original training prompts, not measured rankings of employer question frequency. The scenarios in this article are hypothetical.

The suggested answers illustrate reasoning; they are not scripts or a prediction of how a particular interviewer will score you. Record an answer before reading each discussion. Keep the moment you become uncertain. That is often a better preparation target than the topic you enjoy revising.

The practice loop

Use the same loop for every prompt.

  1. Pick 1 prompt. Read only the question, and set a 2-minute timer.
  2. Answer aloud without notes. Record your screen and voice if you can. When you become uncertain, mark that moment.
  3. Take the follow-up. Read it only after your first answer is finished.
  4. Score the attempt. Compare it with the discussion and label it demonstrated, demonstrated after a prompt, needs repair or not reached. Attach the sentence, test or source that supports the label.
  5. Retry after a changed detail. Come back to the same prompt a day later, add the condition from the follow-up, and answer again without reading.

For the full list of questions, see the senior Android developer interview questions and answers. This article keeps 8 prompts that cover the main areas.

Keep a sheet like this for every attempt.

PromptWhere I became uncertainEvidence I would checkScoreRetry date
Name of the promptThe sentence I could not supportThe test, trace or source that settles it1 of the 4 labelsDate and changed detail

1. Does a suspend function make blocking work safe on the main thread?

Question. A repository exposes a suspending function that reads a file and parses a large payload. Can the ViewModel call it without blocking the UI?

What it checks. Whether you treat suspend as a suspension mechanism rather than as a threading contract.

An incomplete answer. “Yes, because suspend means asynchronous.”

A reasoned answer. The modifier allows suspension; it does not automatically relocate arbitrary blocking or CPU-heavy code. The component doing the work should provide a main-safe contract and select an appropriate execution context for operations that need it. Android's coroutine guidance discusses this responsibility.[1]

Inject dispatchers where that makes execution policy testable. Do not wrap every suspending API in IO without understanding what it already guarantees. Blocking file access and CPU-heavy parsing have different resource characteristics.

Follow-up. The operation becomes cancellable when moved to another dispatcher, correct?

Moving a long uninterrupted computation does not add cancellation checks inside it. Explain where cooperation occurs and how frequently it needs to occur for the workload.

Practise it. Identify the blocking boundary, the CPU boundary and the owner of cancellation. For deeper language coverage, see Kotlin coroutines interview questions.

If you want this loop scored against a rubric and repeated after a changed constraint, Android Interview Training is built for that routine.

2. Why did mutating the list fail to produce a StateFlow update?

Question. A state object contains a mutable list. Code changes that list in place and assigns what appears to be the same state back. Collectors do not observe the expected update.

What it checks. Whether you understand equality-based conflation and value semantics for published state.

An incomplete answer. “Force recomposition.”

A reasoned answer. StateFlow conflates using equality, and mutable shared state can make the old and new values indistinguishable to that mechanism. Publish a new state representation with the intended value semantics instead of mutating an already-published collection in place.[2]

Also distinguish Kotlin's read-only collection interface from a guarantee that no mutable backing collection is shared elsewhere. A data class with a List property is not automatically a deeply immutable object graph.

Follow-up. Should StateFlow deliver every intermediate value?

It represents current state and permits conflation for slow collectors. If the requirement is a durable sequence of operations, model and store that sequence explicitly. Do not use state observation as proof that every operation was processed.

Practise it. Describe the difference between current screen state, a transient signal and durable work.

3. Why does a Compose effect use an old callback or restart too often?

Question. An effect performs work for the selected article. The selection or callback changes while the composable remains present. What should restart?

What it checks. Whether you can choose effect keys from the lifetime of the operation, not from habit.

An incomplete answer. “Put it in LaunchedEffect with Unit.”

A reasoned answer. Identify the lifetime of the operation. Keys that identify that lifetime determine when LaunchedEffect should cancel and restart. A callback that should update without restarting long-running work can require a different treatment, such as rememberUpdatedState.[3]

Do not run a side effect directly in a composable body and assume recomposition happens only once. Select the effect API from the ownership and cleanup requirements.

Follow-up. The effect submits a payment-like operation. Does choosing a stable key ensure exactly-once execution?

No. A UI effect lifetime cannot provide a distributed operation guarantee across recreation, crashes and uncertain responses. Persist and identify important operations at the appropriate boundary.

Practise it. Say which changes restart work, which changes only update what the work reads, and what happens when the effect leaves composition.

4. What should survive system-initiated process death?

Question. The screen has a filter, a selected item and an unsent edit. Where should each live?

What it checks. Whether you match each piece of state to its required lifetime and storage.

An incomplete answer. “Keep them all in the ViewModel.”

A reasoned answer. Match required lifetime to storage. A ViewModel can retain relevant screen state across configuration changes, but it does not remain alive across process death.[4] Small reconstruction values belong in saved state. In a ViewModel that means SavedStateHandle, and in a composable that owns only UI logic it means rememberSaveable.[5] Both are for small values such as the filter and the ID of the selected item, not the item itself. Durable application intent needs persistent storage.

Restore identifiers and inputs, then rebuild derived content. Avoid serialising a large live object graph into saved state merely because it is convenient at the call site.

The unsent edit is the user's work, so it is the case for persistence. Saved state is written when the activity stops, so a value typed just before the process dies may not be in it. If losing the edit would hurt, write it to local storage such as Room or DataStore, and say when you write it.[5]

Follow-up. The user explicitly dismisses the screen or signs out. Should the same restoration rule apply?

Not necessarily. State retention after system recreation and retention after intentional dismissal are different requirements. Define the reset boundary and the account namespace.

Practise it. Make a lifetime table covering recomposition, recreation, process death and explicit dismissal. Do not rely on “Don't keep activities” as proof of complete process-death recovery.

5. How do you stop an old page from corrupting a refreshed list?

Question. A next-page load begins, refresh replaces the list, then the old page arrives.

What it checks. Whether you can tie a response to the query or session it belongs to before committing it.

An incomplete answer. “Use distinctBy on the IDs.”

A reasoned answer. Deduplication handles repeated identities, not whether the response belongs to the current list. Associate the request and its cursor with a generation or session, then validate that identity before committing it.

For a database-backed list, define the transaction that updates content, ordering and paging keys. Android's RemoteMediator guidance demonstrates network-to-database coordination.[6] Your application still needs to establish which request represents the current query or account.

Follow-up. 2 products exchange rank on the server. Should a merge preserve their old positions?

Only if that matches the feed contract. Append merging and replacement ranking are different operations. Describe the server's pagination consistency and whether refresh starts a new snapshot.

Practise it. Test an old append after a new refresh and a payload update for an existing ID separately.

6. Should navigation and important actions be delivered as events?

Question. A success event is emitted while the UI has no active collector. What should happen when the user returns?

What it checks. Whether you separate state, transient signals and durable outcomes, and know which one a user action needs.

An incomplete answer. “Use SharedFlow for events and StateFlow for state.”

A reasoned answer. Define whether the outcome must remain actionable. A replay policy or a buffered channel alone does not establish exactly-once user-visible processing across lifecycle changes and crashes. Important outcomes can be represented in durable or reconstructable state with explicit consumption rules.[7]

For navigation, consider whether the destination follows from current application state and whether repeating the action is safe. Keep responsibility for performing UI work at the appropriate UI boundary.

Collection lifetime matters here. In Compose, collectAsStateWithLifecycle collects a Flow in a lifecycle-aware manner, so collection stops while the screen is in the background, and flowWithLifecycle does the same job for a flow collected elsewhere.[7][10] A StateFlow loses nothing by that pause, because the collector reads the latest value on return, but a signal emitted during the pause is missed. That is the practical argument for state over events.

Follow-up. 2 collectors observe the same signal.

Say whether both should act, exactly 1 should act, or the architecture should prohibit that ownership ambiguity. Select the delivery mechanism after deciding those semantics.

Practise it. Walk through no collector, 2 collectors and process recreation. If the explanation only works while a single screen is continuously active, name that limit.

7. Does WorkManager make a network operation exactly once?

Question. A worker submits a save. The server applies it, but the worker loses the response. What happens on retry?

What it checks. Whether you can separate scheduling guarantees from the server's operation semantics.

An incomplete answer. “Unique work prevents duplicates.”

A reasoned answer. Scheduling uniqueness and server operation semantics are different concerns. A retry can reach a server that already applied the request. Persist a stable operation identity or use another reconciliation contract appropriate to the mutation.

WorkManager provides scheduling, constraints and retry mechanisms.[8] It cannot, by itself, determine whether a remote side effect occurred before the connection failed.

Follow-up. The user has made a newer edit while the worker was running.

Do not let the older acknowledgement overwrite the latest local intent. Keep operation identity, local sequence and confirmed server state distinct. Also define server write ordering across devices.

Practise it. Explain what is persisted at each step of an applied-but-unacknowledged sequence, then compare it with the outbox and idempotency keys in Android system design for offline sync, which covers a request that succeeds on the server but times out on the way back.

8. Should 1 failed child cancel its siblings?

Question. A screen loads a profile and an optional recommendations list in parallel. The recommendations call fails with an IOException. Should the profile load be cancelled?

What it checks. Whether you choose the failure relationship between coroutines from the feature's contract, not from habit.

An incomplete answer. “Wrap the call in try/catch.”

A reasoned answer. Decide which results are required and which are optional. In a coroutineScope, a failing child cancels its siblings and the scope, and a try/catch around the async call does not change that, because the failure has already propagated. In a supervisorScope, a child's failure does not cancel its siblings or the scope, so the failure surfaces where you handle it, here at await.[9]

import java.io.IOException
import kotlinx.coroutines.*

data class Profile(val name: String)
data class Screen(val profile: Profile, val recommendations: List<String>?)

suspend fun fetchProfile(): Profile {
    delay(50)
    return Profile("Ada")
}

suspend fun fetchRecommendations(): List<String> {
    delay(10)
    throw IOException("recommendations offline")
}

// Profile is required, recommendations are optional.
suspend fun loadScreen(): Screen = supervisorScope {
    val profile = async { fetchProfile() }
    val recommendations = async { fetchRecommendations() }
    val extras = try {
        recommendations.await()
    } catch (e: IOException) {
        null
    }
    Screen(profile.await(), extras)
}

// Same shape with coroutineScope: the failing child cancels its sibling.
suspend fun loadScreenStrict(): Screen = coroutineScope {
    val profile = async { fetchProfile() }
    val recommendations = async { fetchRecommendations() }
    Screen(profile.await(), recommendations.await())
}

Catch the specific exception you expect. A broad catch or runCatching also swallows CancellationException and breaks cancellation.

Follow-up. The user leaves the screen while both calls are running. What happens in each version?

Both are cancelled. Cancellation of the parent still reaches every child of a supervisorScope; only a child's failure is kept from travelling up and across.[9]

Practise it. For 3 features you know, mark each result required or optional and choose the matching scope.

Use the questions as a diagnostic

For each prompt, keep the first recording, the point where the explanation became uncertain and the example that would verify it. Mark unattempted topics as untested rather than assuming familiarity means readiness.

Repair 1 gap, then answer a changed version. If your revision only improves the wording, test whether the underlying model also improved. “I relied on ViewModel memory for unsent edits” leads to a concrete recovery exercise. “Revise Android” does not tell you what to do next.

For a timed session, run a 60-minute practice round with a colleague or alone. It combines clarification, a controlled test and a follow-up in a single sitting. For why the follow-up is where the round is decided, read the follow-up decides the senior mobile interview.

Continue with structured practice

Android Interview Training is $99, paid once. You keep the book and companion code, and you get 90 days of Guided Practice. You answer realistic prompts, inspect weaknesses, revise your answer, handle changed constraints and compare attempts. It is not a live mock interview with a person. You can read the free sample before buying.

Sources

  1. Android coroutine best practices.
  2. Kotlin StateFlow reference.
  3. Android side-effects in Compose.
  4. Android ViewModel overview.
  5. Android guide to saving UI states.
  6. Android paging from network and database.
  7. Android UI events guide.
  8. Android define work requests.
  9. Kotlin coroutine exceptions handling.
  10. Android state and Jetpack Compose.

Questions readers ask

© 2026 Mike Salari, Interview Runtime. All rights reserved. Quoting a short excerpt with a link to this page is welcome; republishing the article, in full or in part, is not.

Practice the follow-up, not the first answer.

Interview Runtime is the interview book plus 90 days of Guided Practice: you answer first, see the one gap that would cost the point, then answer again when one fact changes.