Android System Design Interview Questions
34 questions
A strong Android system design answer explains how the app works on the phone, including rotation, poor internet and process death. I'd start with what the user needs, draw the main components, then walk through one read and one write. That makes it clear where the data lives, who makes the request and how the screen updates.
How to structure the interview
I'd spend the first few minutes agreeing on scope and drawing the design. Most of the discussion should explain how data moves through the app. I'd leave time for failures and tradeoffs, and follow the interviewer's questions. Targets for speed, freshness, storage and battery use depend on the product, so I'd state my assumptions before choosing numbers.
| Explain | Questions your design should answer |
|---|---|
| Requirements and use cases | Who uses it, what works offline and what this design leaves for later |
| Components | What Compose, the ViewModel, repository, DAO, API and worker each do |
| Reads and writes | Who makes the request, who saves the result and how the UI receives updates |
| Data | How IDs, pages, versions, repeated requests and separate accounts are handled |
| UI behaviour | What the user sees while loading, offline, waiting for sync or facing an error |
| Lifecycle and dependency injection | What survives rotation or process death, and who creates each object |
| Performance and testing | How memory stays limited, lists stay smooth and failures are tested |
Design a Google Notes app shows the full path from Room entities and DAOs to the repository, worker, ViewModel and Compose screen. It also shows manual dependency injection and Hilt. The other answers explain what changes for each problem. A chat message, a payment and a location update have different rules for what must be saved and what can be retried.
The Kotlin snippets show how the Android pieces connect. They omit imports, routine setup and some supporting types where explained. The code browsers show the underlying algorithms separately in Java and Kotlin. These are interview examples, not complete Android projects.
For an app feature, MVVM is a useful starting point. State goes down to the UI and actions go back up, which is unidirectional data flow. Android recommends UI and data layers, with an optional domain layer for shared business rules. For a library, I'd focus on its API, storage, cancellation and what happens when several callers use it at once. Then I'd show how an app creates and calls it. See the official architecture recommendations.
Library Design
- Design an image loading library.
Hard
Design a library that takes an image source and displays the right image in an Android view. While loading it can show a placeholder, and if loading fails it can show an error image. Repeated
- Design an LRU cache.
Hard
A cache keeps values so callers can reuse them without fetching or calculating them again. An LRU cache has limited capacity and removes the least recently used entry when it needs room. Reading or
- Design a caching library.
Hard
Design a reusable library that stores values under keys so different app features can reuse them. A cache avoids repeated work, but its copies may become old and its storage cannot grow forever.
- Design a file downloader library.
Hard
Design a library that downloads a file from a URL to local storage. A caller should be able to start a download, see progress, pause or cancel it, and obtain a complete file when it succeeds.
- Design a logging library.
Hard
Design a logging library that lets application code record diagnostic messages. Developers use those messages to understand what the app was doing before a failure, both during development and after
- Design a networking library.
Hard
Design a reusable networking layer that lets app features send HTTP requests and receive results without each feature rebuilding connection handling, response parsing and cancellation.
- Design an analytics library.
Hard
Design a library that records meaningful actions inside an app and sends them to an analytics service. Product teams use these events to understand behaviour, such as how many people open checkout
App & Feature Design
- Design a disk based cache for the client (platform independent, 32 byte keys, byte array values, persistent, 100k+ objects, configurable max size 10MB 1GB, opaque and secure).
Hard
Design a cache that stores byte arrays in files and can read them again after the application restarts. Every entry has a key of exactly 32 bytes. The values are opaque, meaning the cache stores
- Design a server driven home screen like Swiggy or Blinkit.
Hard
How a server driven home screen works on Android, the section contract, the renderer registry, what an old app does with a widget type it has never heard of, caching, impressions and rollback, with the core code in Java and Kotlin.
- Design the components and overall architecture for a Search feature in an Android application.
Hard
Design search inside an Android app. A user types a query, sees suggestions or matching items and opens a result. The screen should remain responsive and make loading, empty results and failures
- Design an error handling structure.
Medium
Design a consistent way for an app to represent failures and decide how the screen should respond. A failed operation might need a retry, a sign in prompt or an explanation that an item is
- Design a Google Notes app.
Hard
Design a notes app where a user can create, read, edit and delete text notes, including while offline. When the connection returns, changes should sync to that user's other devices.
- Design a trading app with real time charts and trades.
Hard
How a trading client keeps its chart and order book exactly right while thousands of ticks a second arrive, and still redraws smoothly.
- Design Instagram Stories.
Hard
Design a stories feature where users view a sequence of photos and short videos posted by people they follow. In this version each story expires 24 hours after publication, and the viewer can move
- Design live location tracking for a delivery app like Blinkit or Zomato.
Hard
How a rider app publishes its position all shift without flattening the phone, and how the customer's pin still glides across the map instead of jumping.
- Design the Uber app.
Hard
Design the mobile experience of a ride hailing service. A rider chooses a pickup and destination, requests a trip and follows the assigned driver's arrival. The driver receives an offer, accepts it
- Design WhatsApp.
Hard
Design a messaging app where users can send messages, read conversation history and see delivery progress. A message composed without a connection should remain on the device and be sent when
- How do you implement a hotel list and detail screen? Discuss the APIs you would create and how the layout will work.
Hard
Design the screens and APIs for finding a hotel and inspecting its details. A user enters a destination, dates and guest count, browses matching properties and opens one to see photos, amenities and
Caching & Offline
Offline and caching is where a mobile design round almost always ends up, because it is the part that separates mobile design from backend design.
- How do you build an offline first app? Explain the architecture.
Hard
Design an app whose core screens keep working without an internet connection. Users can read previously saved data and, for features that support it, make changes that will sync later. The app should
- Implement a caching mechanism.
Medium
Design caching for one app screen so previously loaded content can appear quickly and remain useful when a refresh fails. The cache stores a local copy of server data, with an explicit rule for when
- In an Android app, how do you handle data syncing when the network isn't stable?
Medium
Design synchronization that keeps local app data and server data consistent when the connection repeatedly drops. A request may fail before reaching the server, or it may succeed on the server while
Data & Security
- What is the difference between database normalization and denormalization?
Easy
Normalization splits data into separate related tables to eliminate duplication, denormalization deliberately duplicates data across tables to avoid joins and make reads faster.
- What is the difference between hashing, encrypting and encoding?
Easy
The difference is whether the transformation can be reversed, and if so, who's allowed to reverse it.
- What is the difference between symmetric and asymmetric encryption?
Easy
Symmetric encryption uses the same key to encrypt and decrypt. Asymmetric encryption uses a linked public and private key pair. For encryption, the public key encrypts and the private key decrypts.
Less common, worth knowing
These come up less often. Skim them once you are comfortable with everything above.
Library Design
- Design an image downloading library.
Hard
Design a shared image download library that fetches image files for app features. Callers give it a URL and receive a local file or a failure. This layer handles the bytes. Turning those bytes into a
App & Feature Design
- Can we identify the users who have uninstalled our application?
Medium
There is no callback. Android never tells your app it has been uninstalled, because by then nothing of yours is left running to hear it. You infer it instead, and there are two signals worth naming.
- How does "Where Is My Train" work without internet?
Medium
Explain how an app could estimate a train's progress when mobile data is unavailable. The user should still be able to see approximately where they are along a known route using information already
- Design a checkout screen.
Hard
Design the checkout flow that turns a shopping cart into a confirmed order. The customer reviews items, address and total, chooses payment and sees whether the order succeeded, failed or is still
- Design a Facebook Near By Friends app.
Hard
Design a feature that lets people who choose to share their location see which friends are nearby. It needs to explain how recent each location is and stop sharing when a person withdraws permission.
- Design a real time Twitter feed timeline. How will you structure the backend? WebSocket or REST, and why?
Hard
Design a social feed that shows posts from accounts a user follows. Users should be able to load the latest posts, scroll through older ones and learn when newer posts become available while the feed
- How do voice and video calls work?
Hard
Explain how a calling app connects two people and carries their microphone audio and, optionally, camera video in real time. The app must establish the call, let the recipient accept or decline,
- Solve design problems based on a location based app.
Hard
A location based app uses where someone or something is to offer a feature. The prompt needs a concrete use case before it has one design. Finding nearby shops, following a courier and notifying
Data & Security
- What is the SMS Retriever API in Android?
Easy
The SMS Retriever API lets your app automatically read a one time verification code from an incoming SMS, without asking the user for the READSMS or RECEIVESMS permission.
- How do you get accurate time in Android?
Medium
Design time handling for an Android feature that cannot blindly trust the date and time shown on the phone. First distinguish measuring how long something lasts from knowing the current time agreed