Working offline¶
How the mobile app behaves without a network connection — what works, what caches, and what happens when you reconnect.
Required role
Any mobile-enabled role (Technician, Mapper, Admin).
Overview¶
The mobile app is offline-first. This isn't a backup mode — it's the primary design assumption. A technician can walk an entire shift through a steel-clad plant with no signal, execute every assigned task, capture photos, raise repair requests, and have all of it sync automatically the moment they step back into range.
This matters because real maintenance work happens in places where networks don't: basements, cold rooms, Faraday cages of stainless steel, remote sites, underground facilities.
What works offline¶
Everything that a technician needs to do the job:
- Open any task assigned to you.
- Execute a task — fill forms, acknowledge safety, capture photos.
- Save a task as a draft and come back to it later.
- Submit a task (it queues for upload).
- Scan NFC tags and barcodes (no network needed — the matching task point is resolved from the local cache).
- Browse the asset hierarchy.
- Submit a repair request.
- Report a shutdown.
- View your task history.
- Switch language.
For mappers, creating hierarchy nodes and writing NFC tags also work offline — the changes queue for upload.
What doesn't work offline¶
Only things that inherently require a round-trip to the server:
- Signing in for the first time after a factory reset (pairing needs network).
- Downloading updates to the hierarchy, master data, or translations that happened on the server after your last sync.
- Viewing another technician's work in real time.
- Receiving push notifications for new assignments (they arrive the next time you have signal).
- Approving / rejecting tasks (supervisors rarely use mobile for this anyway).
What the app caches on your device¶
The cache lives in encrypted on-device storage. It holds:
| Data | Refreshed every |
|---|---|
| Your assigned tasks | Sync cycle (~15 min) or WebSocket event |
| Asset hierarchy for your company | Sync cycle — incremental (delta sync) |
| Components and their options | Sync cycle |
| Safety procedures | Sync cycle |
| Master data (units, products, tools, thresholds) | Sync cycle |
| Translations for your language | Sync cycle |
| Your profile and settings | Sync cycle |
| Photos queued for upload | Until uploaded |
| Task drafts (in-progress work) | Until submitted or discarded |
The app does not cache:
- Other technicians' tasks.
- Historical reports beyond what the Task History screen pulls on demand.
- Photos you've already uploaded (once uploaded, they're fetched from the server when you view them).
The outbox: what's waiting to upload¶
When you're offline and submit a task, raise a repair request, or attach a photo, it goes into an outbox on the device. The Dashboard badge shows Pending uploads: N so you always know what's queued.
Items in the outbox:
- Submitted task forms.
- Uploaded photos.
- Task drafts that are saved but not submitted (these don't count as "pending upload" until you submit).
- Safety acknowledgement timestamps.
- Created hierarchy nodes (mappers).
- Written NFC tag registrations (mappers).
When the device reconnects, the outbox drains in the background. Photos upload separately from form data — form submissions usually clear first, then photos trickle in.
How the app knows it's offline¶
Several signals:
- The OS reports no network (most reliable).
- API calls time out.
- The WebSocket connection drops.
When the app considers itself offline, the sync indicator on the Dashboard changes colour, and push notifications stop arriving (they'll backfill when the connection returns).
The reconnection flow¶
When you come back into signal, within a few seconds:
- The app detects network is back.
- It pings the server's health endpoint.
- If the server responds, sync starts.
- The outbox uploads in priority order: form submissions first, photos second, mapper changes last.
- The app pulls any server-side changes since your last sync (new assignments, hierarchy edits, master data updates).
- The WebSocket reconnects for real-time updates.
- The Pending uploads badge counts down to zero as items succeed.
If an item fails to upload (server rejects it, network drops again), it stays in the outbox and retries on the next sync cycle.
Conflict resolution¶
Rarely, a task you've executed offline conflicts with server-side changes:
- Task was reassigned to someone else. Your submission is rejected; you're notified.
- Task was deleted. Your submission is rejected; you're notified.
- Task fields changed. Your submission is rejected; you're notified and can review the new version.
The default conflict-resolution policy is server wins. Your local work isn't discarded silently — you see a clear notification and can export the draft as text if the data is worth preserving.
Conflicts are rare in practice because supervisors don't edit in-progress tasks.
Draft persistence¶
Drafts are saved to the local database on every field change — there's no "lose your work when the battery dies" failure mode. You can:
- Save a draft explicitly (Save draft button).
- Close the app — drafts persist.
- Kill the app process — drafts persist.
- Restart the device — drafts persist.
- Factory reset — drafts are lost. Don't factory reset with unsynced drafts.
Offline safety considerations¶
A few things to keep in mind:
Time synchronisation
Offline timestamps use the device's clock. If the clock is badly wrong, your submission times look wrong on the server. Keep automatic date/time sync enabled at the OS level.
Very old drafts
If a draft has been sitting for a week unsynced, the task it references may have changed on the server. Check with your Supervisor before submitting.
Check Pending uploads at end of shift
Before you put the device down, glance at the Dashboard. If Pending uploads isn't zero and you're on Wi-Fi, wait a minute for it to clear. If it's still non-zero, see Sync is stuck or failing.
Storage and battery¶
The cache can grow to a few hundred MB on a large plant. If storage is tight:
- Settings → Clear cache removes cached hierarchy / master data (they re-download on next sync).
- Clearing cache never removes drafts or pending uploads.
- Photos queued for upload are the biggest storage consumers — they compress on-device, but several large photos can still add up.
Battery impact of offline work is minimal. The expensive operations are camera / photo compression and GPS (not used heavily). Background sync cycles are short and batched.
Verify the app is healthy while offline¶
Spot-check occasionally:
- Dashboard loads without errors.
- Tapping Tasks shows your assigned list.
- Opening a random task shows the full form definition.
- Opening the hierarchy shows your expected tree.
If any of these are broken while offline, the cache may be corrupt or your sign-in session may have expired. See Sync is stuck or failing.
Related topics¶
- Sync and connectivity — the mechanics of background sync.
- Executing a task — the main offline-capable workflow.
- Task drafts — saving work in progress.
- Sync is stuck or failing — when the outbox won't drain.