70 questions / 10 random questions
Random questions, instant feedback, and review for missed questions.
What should be clarified first when designing a new business mobile app?
Answer: Target users, key tasks, and offline and security needs
Define use cases with mobile context such as movement, one-handed use, connectivity loss, battery, and shared devices to guide architecture, data, permissions, and UI.
The UI became complex by calling network APIs and local databases directly. What is an appropriate improvement?
Answer: Make repositories the data-layer entry point
Repositories hide network, cache, and database differences while centralizing updates and conflict resolution, allowing UI code to focus on state and user events.
Multiple components independently update the same screen state, causing inconsistencies. Which design is appropriate?
Answer: Separate them with a single source of truth and one-way data flow
State flows from its owner to the UI, while user events return to that owner for centralized updates. Transitions become traceable and testable.
Which design prevents losing an in-progress draft when the OS terminates the app process in the background?
Answer: Save drafts locally in stages and restore on relaunch
Data that must outlive UI or process lifetime should be persisted. Design save cadence, encryption, deletion rules, and schema migration as well.
Network requests duplicate after rotation or window-size changes. Which state-management approach is appropriate?
Answer: Share the request from a state holder that outlives UI recreation
UI instances may be recreated during configuration changes. Separate data loading from the UI instance and use lifecycle-aware observation and request deduplication.
Which navigation-stack and back-navigation design is appropriate?
Answer: Define back behavior per destination, modal, and deep link
Design predictable hierarchy and task boundaries. Test parent behavior from deep links, unsaved changes, and returning from authentication.
Which layout design appropriately supports phones, foldables, and tablets?
Answer: Adapt panes to size classes and posture
Choose list-detail, navigation rail, or two-pane patterns based on available space rather than device names, preserving state during window resizing.
Which boundary design is appropriate between shared business logic and Android or iOS platform APIs?
Answer: Implement domain-side interfaces with platform adapters
Keep domain logic independent of platform details to improve testing and replacement, while preserving platform-specific UX where appropriate.
What is an appropriate source of truth for screen data in an offline-first app?
Answer: Read a synced local database and write network results there first
An observable local source provides consistent data regardless of connectivity, while repositories handle network synchronization and conflicts.
Which design reliably sends a comment created while offline?
Answer: Persist it in a local outbox and retry in the background
Store operation ID, payload, and retry state in an outbox that survives process death. Use network constraints and exponential backoff, exposing pending or failed status.
Multiple devices edit the same record while offline. Which synchronization design is appropriate?
Answer: Detect conflicts by version and choose merge or user resolution
Whether last-write-wins is appropriate depends on data semantics. Choose server versions, field-level merge, CRDTs, or user resolution based on business impact.
What is the core design for preventing duplicate purchases when retrying after a mobile-network timeout?
Answer: Attach an idempotency key so the server reuses the result
After a timeout, the client cannot know whether the server completed the action. Retry with the same operation ID so the server applies the side effect once and returns the durable result.
Which data-loading design is appropriate for an infinite-scrolling feed?
Answer: Use cursor pagination and a local cache with deduplication
Cursors and stable IDs reduce duplicates and gaps in changing feeds. Show cached items first and handle initial, refresh, and append errors separately.
Which retry policy is appropriate for mobile network APIs?
Answer: Retry only transient errors with bounded backoff and jitter
Separate retryable timeouts, disconnects, and some 5xx errors from client or auth errors needing correction. Retry budgets and jitter limit battery use and thundering herds.
After a user leaves search, an old response returns and overwrites the new screen. What is an appropriate fix?
Answer: Cancel stale tasks and apply only the latest result by request ID
Asynchronous responses can arrive out of order. Structured concurrency, cancellation, and sequence IDs define lifecycle ownership and result-application conditions.
Which design is appropriate for non-urgent synchronization that should run after the app is closed?
Answer: Delegate to the OS scheduler with constraints and deadlines
Mobile operating systems restrict background execution. Use platform schedulers with battery, network, or charging constraints and make tasks idempotent and resumable.
The UI stalls during scrolling and ANRs or hangs increase. What is the first design improvement?
Answer: Move network, disk, and heavy decoding off the main thread
The UI thread handles input and rendering. Trace long tasks, locks, I/O, and excessive layout, then apply asynchronous work, chunking, precomputation, or caching.
A photo list crashes from memory pressure. Which image design is appropriate?
Answer: Downsample to display size and use a bounded cache
Decoded image memory can greatly exceed compressed file size. Use thumbnails, appropriate pixel sizes, reuse, and bounded prefetch to reduce peak memory.
Which strategy is appropriate for improving a slow cold start?
Answer: Measure time to first display and defer non-essential work
Trace main-thread initialization, dependency injection, database opening, and SDK startup. Show useful UI early and defer, parallelize, or background nonessential work.
Which synchronization design reduces battery and mobile-data consumption?
Answer: Batch updates and use delta sync to reduce radio wakeups
Frequent wakeups, GPS, and full downloads consume battery and data. Define freshness needs and, when push triggers sync, fetch actual data only when appropriate.
Which design is most appropriate for storing a login refresh token on a device?
Answer: Store it in OS-protected storage such as Keychain or Keystore
Store tokens in OS secure storage with an accessibility policy appropriate to the use case. Keep them out of logs, backups, clipboards, and screenshots, and remove them on logout or revocation.
A payment app adds root detection. How should server-side authorization be designed?
Answer: Treat device signals as risk input and have the server authorize every time
Clients are modifiable and root or jailbreak detection can be bypassed. The server must make the final decision for sensitive actions; integrity signals can drive risk-based controls such as step-up authentication.
Which operational design is appropriate when certificate pinning is adopted?
Answer: Plan backup pins, key rotation, and an emergency release path
Pinning can disconnect every client after a certificate change. Use it only when justified by the threat model, retaining normal TLS validation and preparing overlapping pins, monitoring, and recovery.
What is the best design for sensitive offline data stored in an on-device database?
Answer: Minimize fields and retention, with key separation and backup controls
Encryption at rest does not protect decrypted displays, logs, backups, or leaked keys. Minimize storage and design key management, access, retention, and deletion together based on data classification.
What is the best timing and fallback for requesting camera permission?
Answer: Ask only when capture is chosen, with a reason and minimal scope
Just-in-time requests make purpose clear and reduce unnecessary access. Recheck permission state because it can be denied or revoked, and design graceful degradation per feature.
What privacy work is most important before adding a third-party analytics SDK?
Answer: Inventory collected data and destinations and match store disclosures
An SDK is part of the app's data supply chain. Verify actual network behavior, configuration, pre-consent transmission, and transitive SDKs; disable unnecessary data and keep disclosures synchronized.
What is a safe design for opening an order-cancellation screen through a universal or app link?
Answer: Verify domains and allowlist routes, then require login and order authorization
Deep links are external input. Domain association verifies entry ownership but does not replace business authorization. Separate navigation from side effects and add reauthentication or confirmation as risk requires.
Which design is most appropriate for a WebView that displays external content?
Answer: Prefer the system browser and restrict WebView domains and features
Connecting web content to native privileges expands the attack surface. Distinguish origins and explicitly define navigation, cookies and tokens, downloads, TLS errors, and popups.
Which design is appropriate for updating order details from a push notification?
Answer: Treat the payload as a hint and fetch current state from the authorized API
Push messages may be delayed, dropped, duplicated, reordered, or exposed on a lock screen. Avoid sensitive data, deduplicate by version or event ID, and converge on authorized server state.
Which session design is appropriate for a mobile app using biometric authentication?
Answer: Use short-lived tokens and limit biometrics to unlocking local credentials
Biometrics usually establish local user presence to unlock a key or credential. Keep this separate from server session issuance, expiry, revocation, and lost-device response, requiring fresh authentication for sensitive actions.
Which approach is most appropriate for designing an accessible screen?
Answer: Provide labels, focus order, and touch targets, then test with a screen reader
Accessibility covers information structure, interaction order, state announcements, and layouts under text scaling, not just labels. Test core flows with real assistive technologies and varied settings.
Which design prevents later failures in localization and right-to-left support?
Answer: Use resource strings and plurals, and test with pseudolocales and RTL
Word order, plurals, dates, numbers, direction, and glyph widths vary by locale. Resource complete semantic units and verify start/end layouts and expansion early through automated and visual checks.
Which UI-state design is needed for an offline-capable list screen?
Answer: Distinguish loading, empty, stale, offline, and partial-error states
Connectivity changes and partial failures are normal on mobile. Model data presence, freshness, refresh progress, and action results independently so useful content remains and next actions are clear.
Which observability design is appropriate for a production mobile app?
Answer: Observe crashes and startup by release, OS, and device with redaction
Mobile failures cluster by release, device, OS, and network. Include diagnostic dimensions and correlation IDs while building minimization, redaction, access control, and retention into telemetry.
Which build practice makes native crashes diagnosable after release?
Answer: Retain per-build symbols and map them to crashes by release ID
Optimized or obfuscated stacks cannot be reconstructed without build-specific symbol artifacts. Have CI uniquely link artifacts and versions, and verify successful upload as a release gate.
What is the best way to roll out a high-risk mobile feature?
Answer: Roll out in stages with a server-controlled safe flag and a kill switch
Mobile distribution, review, and user updates introduce delay. Provide controls that can stop behavior without replacing the binary, with safe defaults and compatibility for stale config and offline devices.
How should an on-device database schema migration be released safely?
Answer: Test migration paths from every supported old version with realistic data
Users skip multiple app versions when updating. Test the migration graph, large-database duration, low disk, and interruption, while keeping server APIs and synchronized data compatible with old and new clients.
Which practice is appropriate for release signing and the dependency supply chain?
Answer: Keep signing keys in protected CI with least privilege and verify dependencies
A release key is authority to publish app updates. Avoid distributing it manually; add approval, audit, rotation, and recovery. Pin dependencies reproducibly and track provenance and vulnerabilities per release.
Which pre-release testing strategy is most appropriate for a mobile app?
Answer: Automate domain, sync, and UI tests, supplemented by representative devices and networks
Mobile quality depends on OS lifecycle, hardware, permissions, networks, and upgrades as well as logic. Use a risk-based test pyramid and device matrix prioritized by usage distribution and critical flows.
Crash rate spikes on one OS immediately after a staged release. What is the best initial response?
Answer: Pause rollout, disable by flag, preserve evidence, then decide
First limit impact while preserving diagnostic evidence and classifying affected cohorts. After recovery, review the timeline, detection gaps, test coverage, and guardrails, tracking prevention work with owners and deadlines.
A user loses a device. What is an appropriate mobile login-session revocation design?
Answer: Track sessions per device on the server and revoke only the lost one
Server-side device session IDs, issue times, last use, and recognizable device labels enable targeted revocation. Also support global revocation after password changes or risk events.
You are adding passkey authentication to a mobile app. What server-side validation is most important?
Answer: Verify the challenge, origin, signature, user verification, and credential binding
Passkeys are public-key credentials. The server must prevent challenge replay, validate RP boundaries and signatures, and bind credentials safely to accounts, including recovery and multi-device enrollment.
Can user authorization be skipped when App Attest or Play Integrity returns a positive verdict?
Answer: Validate the nonce on the server and combine it with authorization as a risk signal
Attestation signals app or device integrity; it does not grant business permissions. Design replay protection, server validation, graduated risk responses, and fallbacks.
You must reduce the risk that a sensitive local database is restored to another device through backup or device transfer. What is appropriate?
Answer: Exclude sensitive data from backup and recover with device-bound keys
Backup policy is separate from encryption. Assume device-bound keys may be unavailable after restore and test cache regeneration, session recovery, and user-data restoration scope.
Balances and personal data may appear in app-switcher previews or screen sharing. What is an appropriate control?
Answer: Use OS capture protection and a snapshot mask on sensitive screens
Use secure-window controls, capture-state signals, and scene-background masks. External cameras remain possible, so minimize displayed data and require reauthentication where appropriate.
You are implementing copy-to-clipboard for a one-time code. Which design reduces privacy risk?
Answer: Copy only the minimum value on user action with sensitive flags and expiry
The clipboard can be exposed to other apps, synchronization, or history. Minimize scope and lifetime, and prefer direct entry or autofill paths that avoid clipboard use.
Push notifications stop after device replacement while the server keeps sending to the old device. What token management is appropriate?
Answer: Upsert token changes to the server and delete on invalid responses
Push tokens change after rotation, reinstall, or environment changes. Manage user, app environment, device session, logout removal, and provider feedback as a lifecycle.
A workflow assumes a background task will run exactly at 9:00 every day. What is the correct improvement?
Answer: Assume delay or skipping, make it idempotent, and compensate on launch or server
Mobile operating systems choose background timing based on battery, usage, and network conditions. Put exact-time business work on the server and treat device tasks as synchronization or presentation updates.
Repeated taps on an approve notification action approved the same order multiple times. What is the core control?
Answer: Reauthorize on the server and transition once using the action ID as an idempotency key
Notification actions may be delivered twice, tapped repeatedly, or executed late. Validate actor, resource, allowed transition, expiry, and idempotency on the server.
A deep link requires login, and the app should continue to the original destination afterward. What is a safe design?
Answer: Store only normalized allowlisted routes and reauthorize after login
Deferred deep-link intents can become open redirects or privilege escalation paths. Apply route allowlists, expiry, single use, and resource authorization after login.
A phone call interrupts the app during purchase confirmation, and the screen remains stuck after returning. What is an appropriate design?
Answer: Use server order state and an idempotency key as the truth and query on resume
Calls, screen locks, and process termination can interrupt mobile apps at any point. Keep side-effect state durable on the server and resynchronize UI after lifecycle restoration.
Multiple threads or processes write to a local database and the UI observes partial updates. What is the proper improvement?
Answer: Centralize writes in a repository and transact per business unit
Local databases still require atomicity and writer coordination. Publish snapshots from one source of truth and use supported APIs and file coordination for extension processes.
Process termination after backgrounding rises on low-memory devices. What is appropriate for caches and screen state?
Answer: Release reproducible caches and persist only required state
The OS may terminate background processes under memory pressure. Separate caches from essential state and measure image decode size, lifecycle release, and restoration on low-RAM devices.
During fast scrolling, reused cells display images from old download requests. What is the proper fix?
Answer: Bind requests to stable IDs, cancel on reuse, and recheck before drawing
Cell positions change identity during scrolling and diffs. Tie request lifecycle to view lifecycle and implement cache keys, placeholders, cancellation, and final ID checks.
At the largest text size, the purchase button disappears off screen. What is the appropriate accessibility response?
Answer: Respect font scaling, allow reflow and multiline, and test at maximum size
Information and actions must remain reachable at large text sizes. Revisit fixed heights and truncation, and also verify focus order, touch targets, landscape, and screen readers.
A share extension passes a file to the main app. What is a safe boundary design?
Answer: Validate it as external input, stage it minimally, and reauthorize in the main app
Extensions receive other apps' data under a separate lifecycle and process. Minimize shared-container data and design atomic transfer, expiry cleanup, and hardened parsing.
After a third-party SDK update, store review finds inconsistent privacy declarations. What prevents recurrence?
Answer: Diff-review SDKs and collected data and reconcile declarations at the release gate
An SDK update changes privacy and supply-chain risk. Include lockfile diffs, signatures, data flow, consent, deletion handling, and generated manifest reports in CI and release checks.
An app version not updated for months stops working after an API change. What is appropriate API lifecycle management?
Answer: Track active versions and provide compatibility windows and deprecation
Mobile clients cannot be updated instantly like web code. Design minimum supported versions, grace periods, contract tests, feature negotiation, and upgrade failure behavior when offline.
You need to disable a failing feature through remote config, but offline devices retain stale values. What is an appropriate kill-switch design?
Answer: Combine safe defaults, signature checks, TTL, last-known-good, and staged delivery
A kill switch disables a faulty feature without requiring an app update. For example, if a transfer feature has a defect, changing the server configuration to disabled will not reach an offline device that has cached enabled. Give configuration that enables risky features an expiration time (TTL), and implement a safe fallback on the device, such as disabling the feature when that configuration expires or the initial fetch fails. Last-known-good values help during temporary fetch failures, but an expired enabled value must not remain valid indefinitely. Signature verification checks origin and integrity, not freshness; staged delivery limits the impact of faulty configuration. An offline device cannot be stopped remotely immediately, so the server must also enforce the stop for important operations such as transfers and check queued operations before executing them after reconnection. Choose expiration behavior according to each feature's risk rather than disabling all offline functionality.
Users report frozen screens, but there are no crash logs. What is the core production diagnostic approach?
Answer: Correlate ANRs and hangs with cohorts and breadcrumbs under privacy controls
Freezes occur without process crashes. Combine platform vitals, watchdogs, thread dumps or traces, and release cohorts while redacting PII and controlling sampling and retention.
A native app implements OAuth authorization code flow. Which baseline avoids embedding the login page in an app-controlled WebView?
Answer: Use an external browser with PKCE and validate the response.
Use an external user-agent with PKCE and validate the redirect and request-response binding. PKCE is one part of the authorization flow, not a replacement for all validation.
A shared OAuth client secret is embedded in a native app binary and used as proof of an authentic app. What is the appropriate judgment?
Answer: Treat it as a public client; do not rely on embedded secrets.
A distributed binary cannot reliably keep a shared secret confidential. Use public-client flows such as PKCE and retain separate user and resource authorization.
An Android app treats an order as sent after detecting Wi-Fi, but a captive portal prevents API access. What design is needed?
Answer: Track API outcomes separately from network connection state.
Network attachment does not prove endpoint reachability or order completion. Use network signals to guide attempts, but derive operation status from actual outcomes.
Large videos are automatically downloaded whenever Wi-Fi is connected. How should users on metered Wi-Fi be protected?
Answer: Gate automatic downloads on metering and user settings.
Wi-Fi can be metered. Consider network metering capabilities and user preferences instead of equating transport type with cost.
An Android app lets users choose one profile image. How can it avoid requesting access to the entire photo library?
Answer: Use the system Photo Picker to access only the selected image.
The system picker grants access to selected media without broad library access. Handle cancellation and platform availability as part of the flow.
An Android user grants approximate rather than precise location. Nearby-store search can work at a coarse regional level. How should the app behave?
Answer: Use the granted precision with optional manual region input.
Operate at the granted precision and avoid implying exact positioning. Reflect uncertainty in results and avoid forcing precision when the feature does not need it.
Before translations are ready, how should an Android app detect text expansion and right-to-left layout problems?
Answer: Use pseudolocales to test expanded text and RTL layouts.
Pseudolocales reveal expansion and bidirectional layout issues early. They complement, rather than replace, review using actual translated content.
A download duration becomes negative after the user changes wall-clock time during the same device boot. Which Android measurement is appropriate?
Answer: Measure the difference between elapsedRealtime readings.
SystemClock.elapsedRealtime measures time since boot, including sleep, independently of wall-clock changes. Do not compare these readings across device reboots.
User A creates an offline post, logs out, and user B signs in before synchronization. How should the app prevent sending A's queued post using B's credentials?
Answer: Keep owner-bound queues isolated or suspended on account change.
Pending work belongs to an account. Validate the sending identity, define cancellation or retention on logout, and prevent in-flight results from entering another user's state.
A deleted record reappears when a device reconnects after a long offline period. Which synchronization design helps preserve deletion?
Answer: Keep deletion versions, reject stale writes, and resynchronize.
Represent deletion as versioned state, for example a tombstone. Define safe retention and require resynchronization for clients too old to reconcile after deletion markers are removed.