Offline Sync

The way an app keeps working with no signal by saving the work on the phone and sending it up once the network comes back.

Also known as offline first background sync work offline

Definition

Offline sync is what lets an app keep working with no signal. The work is saved on the phone itself. When the network comes back, the app sends everything up and pulls down whatever changed while you were away.

A delivery driver in a basement car park still marks the parcel delivered. A sales rep in a village still writes the order. A nurse on a ward with thick walls still records the reading. None of them wait, and staff notice the difference on the first day.

The hard part is not saving the data. It is what happens when two people change the same record. A manager edits a customer's address in the office while the rep edits it in the car. Both come back online. Somebody has to lose, or a person has to choose. The lazy answer is that the last one to arrive wins, which quietly throws away real work. The honest answer is to keep both versions and show them to a human, or to record changes as small facts, such as added two units or moved to shipped, so they can be replayed in order without fighting each other.

Some things must never be trusted offline. Anything scarce, and anything about money. Do not promise the last seat, the last room or the last item in stock from a phone that has been dark for an hour. Do not let a price, a discount or a stock level be decided on the device. Do not treat a payment as taken until your own server says so. The phone can hold the request. The server decides. Ask any supplier how they handle a double booking made by two offline phones, and listen closely to the answer.

Cost is the other honest note. Offline work adds real weeks to a build, so ask whether your field staff truly lose signal or simply have a slow connection. Slow is a different problem with a cheaper fix. Linkysoft asks that before quoting a mobile app project, and the answer is often that a browser is enough, because modern web applications can also keep a page usable with no signal, which we cover under offline mode. When Linkysoft does build it, the sync rules are agreed on paper before a line of code.

Questions about Offline Sync

Can any app be made to work offline?
Most can, but not every screen should. Reading and writing your own records works well offline. Anything that depends on a live number from the server, such as remaining stock or a bank balance, does not.
What happens if two people change the same record while offline?
That depends entirely on the rule you agreed when the app was built. A cheap app lets the last one to reconnect overwrite the other. A careful one keeps both and asks a person which to keep.
Is it safe to take payments in an app with no internet?
You can record that a payment was promised, but never treat it as received. Cards and wallets are approved by the bank, and the bank cannot answer while the phone is offline. Confirm it when the signal returns.
How long can an app stay offline before there is trouble?
A working day is comfortable for most businesses. Beyond that the copy on the phone drifts far from the truth, so a good app warns the user how old their data is instead of pretending it is fresh.
Does offline support make an app more expensive to build?
Yes, noticeably. The saving on paper is small, but agreeing the conflict rules and testing them takes weeks. It pays for itself only when staff really do work where there is no signal.

Still not sure how this applies to your project?

Tell us what you are building and we will answer in plain language.