Top 4 Offline first Interview Questions
Browse 4 real-world technical and behavioral interview questions about Offline first. Review scenarios, edge cases, and architectural best practices.
How do you leverage WorkManager to guarantee execution, handle conflict resolution, and optimise battery usage in an offline-first Android application requiring bidirectional synchronisation?
Evaluate the candidate's understanding of offline-first principles, background processing using Android's WorkManager, conflict resolution strategies, and battery optimization techniques. Use this MOBILE answer to show the decision, trade-off, and evidence rather than a memorised definition.
A driver spends part of the day with no mobile signal. How do you design the app so the round still works?
Treat the device as a first-class writer rather than a cache: it generates its own identifiers, records two timestamps per event, and queues durably until the network returns. Every submission carries an idempotency key because retries are certain, and genuine contradictions go to a human.
Two users edit the same record while offline and both reconnect. How do you reconcile the two versions without silently losing one of the edits?
Accepting writes on both sides means conflicts are inevitable, so the design choice is who resolves them. Last-write-wins discards an edit by clock accident; version vectors detect the conflict and hand it back; CRDTs merge deterministically but only for the operations they model. Use this conflict resolution answer to show the decision, trade-off, and evidence rather than a memorised definition.
Two people are typing in the same chat and one is on a train. What arrives, in what order, and what do you store?
Chat ordering with offline clients separates ephemeral typing indicators from durable messages. Messages need a server-assigned per-conversation sequence and a client-generated id for deduplication, so reconnecting phones replay outboxes without duplicates.