Android Mobile System Design Interview Questions
Offline-first, sync, caching, and scale tradeoffs.
50 questions in this topic · 8 sample questions below
Practice Mobile System Design in the quiz engine
Sample questions
In a truly offline-first app, what should be the single source of truth that the UI observes?
Why: Offline-first means the UI reads and writes the local store (e.g. Room) and observes it reactively, while sync updates that store asynchronously. Treating the server as the source of truth defeats offline capability because the UI stalls whenever the network is unavailable.
Two devices edit the same record offline and later sync. A pure last-write-wins strategy keyed on server-receive time can silently lose data primarily because:
Why: LWW resolves conflicts by picking one write and discarding the other; keyed on arrival time it can discard a legitimate concurrent edit with no record that a conflict happened. Vector clocks are one way to detect concurrency, but LWW's flaw is data loss from undetected concurrency, not an inability to compute clocks.
When syncing deletions in an offline-first system, why is a tombstone record usually preferred over simply removing the row locally?
Why: A tombstone marks the record as deleted so the deletion itself can be synced; without it, another device still holding the row re-creates it as a fresh insert on the next pull. Foreign-key constraints are unrelated to why deletions need to be represented as syncable events.
For an infinite feed where items are frequently inserted at the top, why does classic offset-based pagination (LIMIT/OFFSET) produce visible bugs?
Why: Because offset counts positions rather than anchoring to a stable item, inserting rows above the current window shifts everything down, so page 2 re-serves rows already shown on page 1 or skips some. Cursor/keyset pagination anchors on a stable key and avoids this; the total-count cost is a performance nuance, not the correctness bug.
In Paging 3, what is the specific role of a RemoteMediator when the database is the source of truth?
Why: RemoteMediator handles boundary conditions: when the local DB can't satisfy the requested page it fetches more from the network and inserts into the DB, while a separate PagingSource still reads exclusively from the DB. It does not replace the PagingSource nor do conflict resolution.
You cache full-resolution images but display them in small thumbnails and hit OutOfMemory. The most effective fix is:
Why: A decoded bitmap's memory cost is width times height times bytes-per-pixel regardless of file size, so decoding at the display resolution slashes per-bitmap RAM. Enlarging the cache stores the same oversized bitmaps and makes OOM worse; bitmaps in memory are uncompressed pixel buffers, not PNGs.
With HTTP caching, what does an ETag combined with a conditional If-None-Match request buy you that a plain TTL does not?
Why: An ETag enables cheap revalidation: after the freshness window lapses the client asks if the resource changed, and an unchanged resource returns a bodyless 304, saving bandwidth. A pure TTL forces a full re-download once it expires because there is no way to confirm the cached copy is still valid.
The stale-while-revalidate caching pattern improves perceived latency by:
Why: Stale-while-revalidate returns the cached (possibly stale) response instantly for a responsive UI, then refreshes in the background so the next read is current. Blocking on the fresh fetch is exactly the latency the pattern avoids.
Practice all 50 Mobile System Design questions
These 8 are a sample. The full Mobile System Design bank is scored, tracks your progress, and explains every answer.
More Android interview topics
- Android Hilt interview questions
- Android Coroutines & Flow interview questions
- Android Room interview questions
- Android Design Patterns interview questions
- Android Coding Interview Patterns interview questions
- Android NDK interview questions
- Android Sensors interview questions
- Android Security interview questions
- Android Jetpack Compose interview questions
- Android Canvas & Animation interview questions
- Android CI/CD interview questions
- Android Git interview questions
- Android Unit Testing interview questions
- Android Kotlin interview questions
- Android Retrofit interview questions
- Android Architecture interview questions
- Android Android Framework interview questions
- Android Kotlin Multiplatform interview questions
- Android WorkManager & Background interview questions
- Android Performance & Memory interview questions