Alstre
Try it
11 · Mobile app

Offline mode

Without a signal, part of the system keeps working and part does not — and it is worth knowing which before a surveyor goes down into a basement. We describe which screens will open, what happens to the data you enter and how to tell you are working locally.

How it works

Without a signal the app does not stop working — it opens pages saved earlier, and puts changes in a queue and sends them when the network returns.

At the heart of this mechanism is a small program running alongside the app in the browser. It intercepts every request to the server: when there is a network, it passes the request on and stores the response; when there is no network, it uses the last stored version.

Requires opening beforehand
Only screens that have been opened at least once with a signal are saved. A measurement the surveyor never opened in the office will not open on a site without a network. It is worth getting into the habit of reviewing jobs before setting off.

Pages and files are handled differently, because they go out of date at different rates:

Panel screens
First an attempt to fetch a fresh version from the server, and only when there is no network does it fall back to the stored one. This way, with a signal, you never see outdated data.
App files
Styles, fonts and graphics load straight from the phone's memory. That is why the app opens quickly even with a weak signal.

When the network is gone and a given screen is not in memory, the app will show the last stored dashboard instead of the browser's no-connection message.

What works and what does not

Works without a signal
Opening previously visited screens, working in field mode, filling in the measurement wizard, adding and removing items, changing the measurement status. All entered data goes into the queue.
Will not work
Logging in, uploading photos, collecting the customer's signature, checking a VAT number in VIES, searching the whole database, generating PDF documents and sending messages. These are operations that have to reach the server at that moment.

More about working in the field itself: Field mode.

Logging in only with a signal
This is the most common problem on site. If the session expires somewhere without a network, you cannot log in again and work stops. That is why it is worth opening the app while you still have a signal — even in the car park before entering the building.

How to tell the state

A bar appears at the bottom of the screen showing what state the app is in:

  • Red “Offline mode” — there is no connection. Everything you enter waits locally.
  • Yellow “Syncing… (N)” — the connection is back, sending is in progress. The number in brackets is the changes still to be sent.
  • No bar — everything has been sent and synced.
Do not close while the bar is yellow
As long as the sync counter is visible, some changes are still only on the phone. Closing the app does not delete the queue — it will resume the next time you open it — but until then the office will not see that data.

How the change queue works

Saves made without a network — a new measurement item, a dimension correction, removing an item, a status change — go into a queue on the phone together with the time they were made. Photos and the customer's signature do not go into it. The queue preserves the order: changes are sent in the order in which they were made, so a correction will not overtake the entry it corrects.

Sending starts on its own when the phone detects a network. You do not need to click anything or open any screen — it is enough for the app to be open.

Save accepted
It disappears from the queue, the counter on the bar goes down.
Server not responding
The save stays in the queue and will try again the next time the network returns. Nothing is lost.
Server rejected the save
When the cause lies in the data — for example, the item was deleted in the office in the meantime — the save does not return to the queue endlessly. It is worth checking the measurement when you are back.

Where the data is stored in the meantime

Unsent changes are stored in the browser's storage on the phone, tied to that particular installation. They are not visible to other apps or to other users of the same device logged in to a different account.

Clearing the browser data or uninstalling the app with an unsent queue means losing those changes. This is the only way queued data can disappear — the queue itself survives a phone restart and closing the app.

That is why three things are worth doing after returning from the field: open the app with a signal, wait until the sync bar disappears, and only then consider the measurement handed over to the office. Clearing the browser storage “to tidy up” before that moment wipes out a whole day's work.