Android Development Interview Questions: Platform Answers

The Android development interview questions that go past Kotlin: lifecycle, rotation, process death and background limits, with full spoken answers and the follow-up each invites.

By AI Interview AssistantPublished 10 min read

Two software engineers discuss a hand-drawn lifecycle diagram beside a laptop and smartphone at a wooden table.

Android development interview questions rarely stop at language syntax. Past the Kotlin warm-up, the panel tests whether you understand the platform: how the activity and fragment lifecycle works, what happens on a configuration change, what survives process death, and how background work is limited. Answer by naming the platform constraint first, then the mechanism you would use, then the cost of the alternative you rejected. The choice has to survive rotation, process death and battery limits; reciting class names does not show that.

What platform questions actually get asked

The questions cluster into four families, and each one is a platform question because the answer depends on how the OS manages your process, not on how the language behaves.

  • Lifecycle and state. When is a screen created, stopped, recreated? Where does state live so it is not lost?
  • Configuration changes and process death. Rotation recreates your screen; the system can also kill your process while you are in the background. These are different events with different survival rules.
  • Background work and battery limits. The OS restricts what can run when your app is not visible, so long work needs a scheduled or user-visible mechanism.
  • API and architecture choice. Two APIs can do the same job; the question is which one fits the requirement and what it costs to change later.

A good answer passes one test: it names the OS constraint before it names the API. That order shows you understand why the API exists, which is what an android engineer interview is probing for.

The three-part answer: constraint, mechanism, cost

Every platform answer has the same shape, and it fits in about 90 seconds.

An engineer gestures while explaining technical trade-offs to a colleague beside a whiteboard showing mobile architecture diagrams and a cost chart.

  1. Constraint. State the platform rule in one sentence. For example: an activity may be destroyed and recreated when the device rotates.
  2. Mechanism. Name what you would use and where the state lives.
  3. Cost. Name the alternative you rejected and what it would have cost, so the answer shows judgment rather than recall.

Take a short question: "Why not keep screen state in a static variable?" The constraint is that a static field belongs to the process, and the process can be killed while your app is in the background, so the value disappears with no warning. The mechanism is the saved-state mechanism for transient UI state and a lifecycle-aware holder for data. The cost is that a static field looks simpler and survives rotation, which is exactly what makes it tempting, but it leaks the activity context and fails the process-death case.

That is the whole shape. The samples below apply it to the two questions that come up most.

Sample answer: surviving a configuration change

The scenario: a screen with a search field and a list of results. The user types a query, the results are loading, and they rotate the phone mid-search.

A weak answer sounds like this: "I'd put the query and the results in a static variable so they survive the rotation." It survives rotation, but it holds a reference to the activity, which leaks it, and it does nothing when the process is killed in the background. It also hides the real question, which is where each piece of state belongs.

Here is a full answer you could give.

An activity can be destroyed and recreated on a configuration change, so I split the state by what it is. The query text and the scroll position are transient UI state, so I keep them in the saved-state mechanism, which the system restores when the screen is recreated. The results themselves are data, so they live in a lifecycle-aware holder that outlives the activity instance, and the screen observes them. That way rotation restores the query and the list without a refetch, and the holder is not tied to the destroyed activity. The alternative is to refetch on every recreation, which is simpler but wastes a network call and loses the user's place; I would only do that if the data were cheap to reload. What this does not cover is process death, where the holder is gone and only the saved state comes back, so I would also persist the last query if restoring it mattered.

That answer names the constraint (recreation), the mechanism (saved state for UI, a lifecycle-aware holder for data) and the cost of the rejected option (a refetch on every rotation). It also draws the line between rotation and process death before the interviewer has to ask.

The follow-up it invites is: "What happens if the process is killed in the background?" The one-sentence answer: the holder is gone, so the screen comes back with only what the saved-state mechanism kept, which is why anything the user would hate to lose belongs in persistent storage, not just in memory.

Sample answer: background work under battery limits

The scenario: sync a user's notes every few hours, and also refresh when they tap a button.

Start by separating the two requirements. The periodic sync is deferrable: nobody is watching, so the OS can choose the moment. The manual tap is work the user is waiting on, so it should start now and show progress.

The constraint is that the OS restricts background execution. Long-running work while the app is not visible needs a scheduled mechanism that the system controls, or a user-visible one.

For the periodic sync I would use a scheduled work mechanism that the system owns, because the OS limits background execution and will not let a plain thread run indefinitely. I would give it a constraint such as requiring network, and let the system batch it with other work to protect the battery. For the manual refresh, the user is waiting, so I would run it immediately and show a progress state in the UI, and let it continue in a user-visible way if they leave the screen briefly. The alternative is a plain background thread started at app launch, which is simpler to write but the OS may kill it, it does not retry, and it ignores doze and battery limits, so it fails the requirement. The cost of the scheduled approach is that the sync is not immediate, which is fine for the periodic case and wrong for the tap, which is why I split them.

That answer gives the interviewer the distinction they are listening for (deferrable versus user-waiting), the constraint, and the rejected option with its cost.

Choosing between two APIs out loud

When the question is "which API would you use here?", use a decision rule: state the requirement, the constraint, the API, then the migration cost if the choice is wrong.

A worked comparison: two ways to observe data on a screen. The criterion comes first, and it is lifecycle awareness and duplicate observers. If the screen must stop observing when it is not visible and must not create a second observer on recreation, a lifecycle-aware observation fits. If the data is a one-off read with no ongoing updates, a direct call is simpler and the observation machinery is overhead.

Say "it depends" usefully: name what it depends on in one clause, then commit to a default. "It depends on whether the screen needs ongoing updates; if it does, I default to lifecycle-aware observation, and if the data is a single read I use a direct call." Then give the migration cost: switching from a direct call to observation later means changing how the screen subscribes and where the state lives, which is a day of work on one screen but a pattern change across the app.

That is the trade-off shape that the mobile interview trade-off answers article applies across platforms, and it pairs well with the Kotlin follow-up questions on null safety when the panel moves from platform to language.

Where the lifecycle answer goes wrong

Three mistakes account for most weak answers, and each has a fix.

  • Reciting the callback order from memory and getting it wrong. The fix is to describe the guarantee rather than the exact sequence: say the screen may be recreated, and name what you do about it. A wrong sequence invites a correction; a correct guarantee does not.
  • Treating rotation and process death as the same event. The fix is to say explicitly which state survives which: saved state survives both, an in-memory holder survives rotation but not process death, persistent storage survives both.
  • Naming an API with no reason. The fix is to attach the constraint to every API you name, in the same sentence if you can.

Each fix works because it moves the answer from recall to reasoning, which is what the panel can check and what holds up under a follow-up.

The one rule to rehearse before the interview

Every platform answer starts with the OS constraint, not the class name. Rehearse three answers out loud, about 90 seconds each: the rotation answer, the process-death answer and the background-work answer. Time them, because the shape collapses when you run long.

If you use an AI tool to rehearse, treat its suggestions as drafts. It can be wrong about platform details, so check them against the official documentation and say the answer in your own words. For the live mechanics of thinking aloud under pressure, see the live answer frameworks for engineers.

Frequently asked questions

Do I need to know Compose or is the View system still asked about?

Prepare for both at the concept level. The platform questions about lifecycle, state and background limits apply whichever UI toolkit you use, so the reasoning transfers. Say which one you have built with, and if you have not used the other, say so plainly and describe how you would approach the same state problem in it.

How deep should I go on the activity lifecycle in a junior interview?

Go as deep as the guarantee, not the callback list. For a junior role, being able to say that a screen can be stopped and recreated, and where you keep state so it is not lost, is enough. Add one concrete example from your own work and stop before you start reciting the order.

What if I get the callback order wrong in the interview?

Correct yourself once, briefly, and move to the guarantee. Say you do not want to guess the exact sequence from memory, then describe what the platform promises and how your code handles it. Interviewers accept a corrected answer far more readily than a confident wrong one.

Should I bring up process death if the interviewer does not ask?

Yes, in one sentence, when you describe where state lives. It shows you know rotation and process death are different events and that your choice accounts for both. Keep it to a clause rather than a lecture, then let the interviewer decide whether to follow up.

Rehearsing platform answers? See how AI Interview assistant works.

  • Android development interview questions
  • Android engineer interview
  • Android platform interview questions
  • Mobile development interview
  • Technical interview preparation
Several smartphones of different sizes standing on a desk, each showing a colourful app screen, with a laptop mockup behind

13 min read

Mobile Development Interview Questions: Answer the Trade-Off

Mobile development interview questions rarely fail on definitions. They fail on trade-offs. Here is a four-beat spoken pattern with worked answers for lifecycle, threading, sync and performance.

  • Mobile development interview questions
  • Mobile development interview answers
A workstation with a monitor showing request and response arrows between two boxes, a keyboard and an API sketch

9 min read

Backend Development Interview Questions: Define, Then Trade Off

Backend development interview questions are trade-off questions in disguise. Learn a two-part answer shape, a worked idempotency answer and a 20-minute practice routine.

  • Backend development interview questions
  • Backend development interview answers
A developer workstation with two monitors, one showing a web interface mockup and the other code and a server diagram

12 min read

Full-Stack Development Interview Questions: Explain and Defend

A spoken three-beat structure for full-stack development interview questions: define the concept, contrast it with the alternative, and choose with a real constraint.

  • Full stack development interview questions
  • Full stack development interview answers