Signal is the exception, not the rule
Field staff work in basements, warehouses, farms and moving vehicles. If an app needs a connection to save a record, it fails exactly when it is needed, and after a few failures people go back to paper and type it up later. Whether an app works offline decides whether it gets used at all.
Offline-first means the phone is where a record is saved first. The server is where it ends up, when it can get there.
Save on the phone first
When a user taps save, the record is written to storage on the device straight away and the user moves on. There is no spinner waiting for the network. In the background, the change joins a queue of things to send.
Each record gets its own unique identifier on the phone, at the moment it is created. That way the app never has to wait for the server to hand out a number, and a record cannot be created twice if it is sent twice.
Sync in the background, safely
- Send queued changes in the order they were made, as soon as a connection appears.
- Make every send safe to repeat: if the connection drops halfway, sending again must not create a duplicate.
- Let the server check every record again. The phone's checks help the user, but the server's checks protect the data.
- Keep photos in the queue too, resized on the phone so they do not use up the data allowance.
- Retry with growing gaps between attempts, so a weak signal does not drain the battery.
Decide what happens when two edits collide
Sometimes the same record changes in two places while one of them is offline. Decide the rule before you build, not after the first complaint. For most field data, new records never clash, and edits to the same field can follow "the latest change wins" with both versions kept in the history. Where money or stock is involved, flag the clash for a person to review rather than guessing.
Tell the user what has been sent
Staff need to trust that their work arrived. A small, honest status helps: a count of items waiting to send, a clear mark on each record once it reaches the server, and a plain message if something was refused and why. An app that hides its queue makes people take screenshots "just in case".
Photos and location, captured at the moment
Photo and GPS stamps are often the reason a field app exists. Record the time and position when the photo is taken, not when it finally uploads, so the record shows where the work happened rather than where the signal came back.
Test it the way it will be used
Turn on flight mode, create twenty records with photos, walk around, and turn the signal back on. Then do it with a weak connection that keeps dropping. If everything arrives once, in order, with the right times and places, the app is ready for the field.