call(back)

Design Cross-Device Wallpaper Synchronization

A user sets a wallpaper on one device and expects it on their other devices. Design the feature end to end, with most of the weight on the client.

A local change must apply immediately, even offline. Remote changes apply eventually. Devices may be offline for weeks, and two devices may change the wallpaper at nearly the same time. Wallpaper images are large; devices have different screens, limited cache space, batteries, and metered networks; and the user interface must never stutter because of sync.

Cover: the data model and why image assets are immutable; the conflict policy; the local-change and remote-change flows; authentication; retries; cache limits; battery and network controls; image decoding; and how the interface stays responsive throughout.

Hints

Hint 1

Split the state in two: a tiny mutable configuration record (which asset, crop, version) and large immutable assets addressed by content hash. Only the small record ever conflicts.

Hint 2

Only the latest configuration matters, so the outbound queue collapses to the last write and an offline device never replays history — it fetches the current record when it comes back.

Hint 3

Treat a push as a hint. Download with the system's background transfer service, decode off the main thread at display size, and swap only when the new wallpaper is fully ready.

Asked at