Scanning pilots
6Offline scanning and the queue
How the app keeps working with no signal, what it can and cannot do offline, how the queue empties itself, and what to do about a scan the server refused.
What works with no signal#
The scanning half of the app is built for a take off with one bar of signal, or none. The live half is not, because there is nothing live about a cached position.
| Works offline | Needs internet |
|---|---|
| Scanning any category except Register | Scanning the Register category |
| The pilot list and pilot photos | A pilot's scan history from the server |
| Switching competition and category | The live map, the Live Ops feed and the Driver tab |
| The last 40 scans this phone made | Signing in, and refreshing the caches |
Caution
Everything in the left column depends on having synced at least once with this competition selected. A phone that has never been online with this competition can do nothing offline. See Install and first run.
The pilot cache#
The pilot cache is the local copy of the competition's pilot list: name, comp ID, country, registration status, equipment, and the photo, downloaded to the phone's storage.
It is versioned. On a normal refresh the app sends the version it holds, and the server usually answers that nothing changed, which costs almost no data. That is why the status line often reads Pilot cache already up to date (137 pilots). rather than reporting a download.
Note
Photos are stored in the app's own storage, not in your camera roll. Uninstalling the app removes them.
The register first rule#
Offline, the app will only queue a scan for a pilot it has already seen registered on this phone. If it has not, it refuses with Register scan required first. Scan the Register category before any other category.
The reason is that Register is the scan that proves the person and their paperwork were checked by a human, online, against the live record. Letting other categories be queued for someone who was never registered would put unverifiable scans into the competition.
Tip
Online this never comes up: the server answers for every pilot in the competition, whichever phone did their registration. The rule only applies to scans queued offline on this phone.
How the queue empties itself#
A scan made with no connection is stored on the phone and counted under Pending. You do not have to do anything else: the queue uploads itself
- as soon as the phone regains a connection,
- every time you bring the app back to the foreground,
- when you sign in,
- on Refresh all and on pull to refresh,
- and immediately when you tap the Pending chip or Sync queue now.
Scans are sent in batches of up to fifty, oldest first, grouped by competition, so a queue from two competitions ends up in the right two places. When it finishes you get a line like Queue sync complete. Pending: 0, failed: 0. and each uploaded scan turns from Queued into Synced in Recent activity.
Caution
The queue lives on one phone. It cannot be synced from another device, and it does not survive uninstalling the app. Get the pending count to zero before you hand the phone on, wipe it, or reinstall.
Failed scans#
Failed counts scans the server actively refused, as opposed to scans it never received. A refusal is a decision, so retrying the same scan usually produces the same answer.
The usual causes are a pilot who was withdrawn from the competition after you scanned them, a category the organizer removed or closed, or a session that expired while the phone was offline for a long time.
- Tap Sync queue now once, in good coverage. A failure caused by a bad connection clears here.
- If the count stays, note which pilots are affected from Recent activity.
- Tell the organizer. Only they can add the scan on the website, and only they can tell you why the server said no.
- If the pilot is still in front of you and the cause was a lost session, sign out, sign in again and rescan them.
Note
Failed scans are not lost: they stay on the phone with their error text, so the record of what you tried survives even when the upload does not.
Limits worth knowing#
Tip
Those limits are generous for one event. They exist so that a phone used for a whole season does not slowly fill up with old receipts.