Mobile App Architecture, Lifecycle, and Performance Questions
Cross-platform mobile engineering concerns above the language layer: the app and component lifecycle, state preservation across process death, memory and resource management on constrained devices, fragmentation, and performance optimization. Covers the architectural and runtime reasoning shared by iOS and Android work. A platform-agnostic mobile competency.
System design: Design an image caching subsystem for a mobile app. Requirements: memory cache budget ~20MB on-device, disk cache up to 200MB, concurrent reads, quick eviction, progressive thumbnail-to-full loading, and minimal CPU/battery overhead. Describe architecture (LRU memory cache, disk cache strategy, concurrency model), eviction/compaction policies, cache keying, and how to handle remote updates and cache invalidation.
Describe the steps and key code pieces to implement a React Native native module in Kotlin for Android that subscribes to accelerometer sensor updates and emits events to JavaScript. Discuss lifecycle handling, permission checks, sampling rate, event throttling, and how to avoid flooding the JS thread.
Design a cross-platform image pipeline for mobile apps that supports progressive loading, auto-downsampling for device density and memory constraints, network-aware prefetching, disk and memory caching with eviction, and a clean API usable from both Android and iOS. Provide the data flow, component responsibilities (fetcher, decoder, transformer, cache), and a strategy for cross-platform code reuse.
Technical task (Kotlin/Java): Design and partially implement a thread-safe, low-allocation LRU cache suitable for Android. The cache should support get(key) and put(key, value) with eviction when capacity is exceeded. Describe an approach that minimizes per-entry allocation (e.g., node reuse, sharding, or using primitive arrays) and show core methods with attention to concurrency and minimizing lock contention.
React Native app: the native Android Activity is destroyed and recreated (e.g., due to rotation or process death). How do you ensure JS state and navigation state persist across this event? Discuss use of redux-persist, native bridging, and rehydration timing to avoid UI flashes or inconsistent state.
Unlock Full Question Bank
Get access to all Mobile App Architecture, Lifecycle, and Performance interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.