Offline Sync

Offline sync is the way an app keeps working with no signal, because it saves the work on the phone and sends 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, so nothing is lost while you are out of range. When the network comes back, the app sends everything up and pulls down whatever changed while you were away.

That is why a delivery driver in a basement car park still marks the parcel delivered. A sales rep in a village writes the order the same way, and a nurse on a ward with thick walls still records the reading, because the app never has to ask the network first. Nobody waits, and staff notice that difference on the first day.

The hard part is not saving the data, but deciding 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, and both come back online. Somebody has to lose, or a human has to choose, and the lazy answer is that the last one to arrive wins. That quietly throws away real work, so the honest answer is to keep both versions and show them to a human. Another way is to record changes as small facts, such as added two units or moved to shipped, so they replay in order without fighting.

Some things must never be trusted offline, above all 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. For the same reason a price, a discount or a stock level should never be decided on the device, and a payment is not taken until your server says so. The phone only holds the request, because the server is the one that decides. Ask any supplier how they handle a double booking made by two offline phones, and listen closely.

Cost is the other honest note, because offline work adds real weeks to a build. So ask whether your field staff truly lose signal or simply have a slow connection, since 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. Modern web applications can keep a page usable with no signal too, which is what we cover under offline mode. When Linkysoft does build proper sync, the rules are agreed on paper before anyone writes 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.