Lifecycle and configuration changes
- What happens to an Activity on rotation, and why that breaks naive state handling.
- `onSaveInstanceState` versus a ViewModel - what each survives, and the fact that a ViewModel does not survive process death.
- Why is a long-running operation in `onCreate` a problem?
- Fragment lifecycle versus its view lifecycle, and why observing with the wrong one leaks.
- What is process death, and how do you test for it? Most candidates have never deliberately triggered it, and saying you have is a strong signal.
Memory leaks, a reliable question
- Holding a reference to an Activity context in a long-lived object - the canonical leak.
- Non-static inner classes and anonymous listeners retaining the outer class.
- Observing a LiveData or Flow with the fragment lifecycle rather than the view lifecycle.
- Application context versus Activity context, and which to use where.
- How would you find a leak? LeakCanary, or a heap dump and tracing the retaining reference.
Concurrency and architecture
- Coroutines - scopes, `viewModelScope`, structured concurrency and what cancellation does.
- Dispatchers - Main, IO and Default, and which work belongs where.
- Flow versus LiveData, and when `StateFlow` is appropriate.
- MVVM and unidirectional data flow, and what you are actually gaining.
- Dependency injection with Hilt or Koin, and why it matters for testability.
Compose and the platform
If the role is Compose, expect recomposition - what triggers it, what `remember` and `rememberSaveable` do, why state hoisting exists, and how it compares to the View system. Then platform questions: background work with WorkManager versus a service, the runtime permission flow, and what an ANR is and what causes one.
How deep it goes by level
- Junior: the fundamentals above, explained clearly. Nobody expects production scars yet, and honesty about what you have not done reads better than bluffing.
- Mid-level: the same ground, plus an app you have shipped to the Play Store. Expect follow-ups asking why you made a particular choice rather than whether you know the syntax.
- Senior: a crash or ANR you traced, and how you handled a difficult migration. At this level the language questions get shorter and the judgement questions get longer.
Whatever the level, the reliable way to prepare is to say your answers out loud rather than reading them. Most of what candidates lose in a Android interview is lost in the gap between knowing something and explaining it under observation - the method is in how to use AI for interview prep.
Where CoPilot Interview fits
Disclosure: we build an interview assistant, so treat this as a disclosed pitch. CoPilot Interview is a native Windows and macOS app that puts suggested answers on your own screen in about two seconds, across coding, system design and behavioral rounds, with a permanent free tier that needs no credit card.
Frequently asked questions
What are the most common Android interview questions?
Activity lifecycle and what happens on configuration change, `onSaveInstanceState` versus ViewModel, common memory leaks involving Activity context, coroutines and dispatchers, and recomposition if the role uses Compose.
What happens to an Activity when the device rotates?
By default it is destroyed and recreated, so any state held only in fields is lost. A ViewModel survives the recreation, while `onSaveInstanceState` survives both that and process death, though it is limited to small amounts of data.
What causes memory leaks in Android?
Most commonly, a long-lived object holding a reference to an Activity context - a static field, a singleton, a non-static inner class or an anonymous listener. Observing lifecycle-aware data with the fragment lifecycle instead of the view lifecycle is another frequent source.
Does a ViewModel survive process death?
No. A ViewModel survives configuration changes such as rotation, but not the process being killed in the background. State that must survive process death belongs in saved instance state or persistent storage.
Walk into the round with a second pair of eyes
CoPilot Interview is a native Windows and macOS app that puts suggested answers on your own screen in about two seconds, across coding, system design and behavioral rounds. The free tier is permanent: 15 minutes a day, no credit card.
Try it free