> For the complete documentation index, see [llms.txt](https://docs.snapfix.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snapfix.com/how-the-apps-work/screens/account/download-data.md).

# Reloading Snapfix

{% hint style="info" %}
Draft, written by an agent and not yet checked by a person ([how to read these docs](https://docs.snapfix.com/how-to-read.md)). Platforms: iOS and Android. [Source on GitHub](https://github.com/snapfix/docs/blob/main/spec/screens/account/download-data.md).
{% endhint %}

The full download of a person's sites and their data onto the phone. It runs after sign-in, titled "Loading your Snapfix account", and again when someone chooses to reload, titled "Reloading Snapfix...". Nothing else in the app is usable while it runs.

* **Where:** iOS and Android:
  * straight after sign-in;
  * from the [splash screen](https://docs.snapfix.com/how-the-apps-work/screens/account/splash.md) when a reload is pending;
  * side menu "Reload", after a confirmation;
  * "Reload Snapfix App" in [Settings](https://docs.snapfix.com/how-the-apps-work/screens/account/app-settings.md), after a confirmation;
  * iOS: from the [walkthrough](https://docs.snapfix.com/how-the-apps-work/screens/account/walkthrough.md) when a signed-in user finishes it; Android: from the walkthrough when a reload is pending.
* **Who:** a signed-in person; no role check. It always downloads the sites that person belongs to.
* **Feature:** [App launch](https://docs.snapfix.com/product/features/account/app-launch.md)

## Layout

A looping Snapfix logo animation, a progress bar, the status line, and the app version at the bottom ("v.6.10.82" on iOS, "v. 6.10.82" on Android). Android also shows the Snapfix logo above the animation, unless the splash marked the device as a small screen.

| How it opened                            | Status line                    |
| ---------------------------------------- | ------------------------------ |
| After sign-in                            | "Loading your Snapfix account" |
| "Reload", the splash and the other paths | "Reloading Snapfix..."         |

The bar is a timer, not a measure of what has downloaded. iOS adds 1% every half second up to a cap that rises with each step (10, 20, then 85 or 95). Android adds 1.5% a second toward 12, then 30, then 50. Both fill it when the download ends.

## Inputs

None.

## Actions

Nothing on the screen is tappable while the download runs. Android's back handler is empty, so back does not leave.

| Action             | Who       | What happens                                                                                                                                                                                                                                                                               | API                                                                                                                                                                                                                                                                                                                                                    |
| ------------------ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Start the download | Automatic | Pending local changes sync first. iOS waits until the sync is idle, then wipes the local database. Android sends the first request at once and wipes only after the sync finishes and the answer arrives. A reload from the Android menu keeps the selected site; other openings clear it. | [`POST ?action=read_parent_data_v2`](https://docs.snapfix.com/engineering-reference/api/tasks.md#post-actionread_parent_data_v2) for the sites, then [`ANY ?action=read_parent_business_data_v2`](https://docs.snapfix.com/engineering-reference/api/groups.md) for the groups of the sites in the selected site's region (or the first site's region) |
| Finish             | Automatic | iOS opens the home tabs on Fix; Android opens the group list and restores the saved feed filter. Both then load the rest of the account in the background: rooms, areas, checklists, tags and compliance.                                                                                  | Android filter: [`GET /v1/app/user/preferences`](https://docs.snapfix.com/engineering-reference/api/account.md#get-v1appuserpreferences)                                                                                                                                                                                                               |

* iOS downloads at most 500 tasks per group here and pages the rest in the background (`SVProgressHUD/PaginationHelper.swift:13, 144-145`).
* iOS stops without a message when the site request returns an empty site list: the bar stalls and the screen stays.

## States

* **Loading:** the animation, the progress bar and the status line.
* **Empty:** a person in no site, or with sites but no groups, gets an alert and is signed out (see [Dialogs](#dialogs-and-sheets)). So a site with no groups yet cannot be used from the app \[[ASK-38](https://github.com/snapfix/docs/blob/main/ASK.md#ask-38-should-a-user-whose-sites-have-no-groups-be-signed-out)].
* **Error:** iOS retries a failed request three times with no message, then shows "Account details not found.". Android wipes the local database and shows the same dialog at once. On Android, the answer "set password required" opens [Set password](https://docs.snapfix.com/how-the-apps-work/screens/account/set-password.md); "verification required" holds the bar at 10 and waits; an expired token is refreshed and the download starts again.
* **No permission:** none on the screen. The Android menu "Reload" asks for storage permission on Android 6 to 12 ("To reload app data allow Snapfix access to your device's storage."); denying it does not start the download.
* **Offline (mobile):**
  * iOS has no connection check on this screen: a failed request counts as an attempt, and after the third the "Account details not found." alert shows. The iOS menu "Reload" refuses while offline: "You must be connected to the Internet to carry out this task. Please connect and try again." with "Ok".
  * Android shows "You must have internet access to login." with "Retry" and "Cancel". "Retry" starts again; "Cancel" signs the person out.

## Dialogs and sheets

**Before the screen:**

* iOS side menu "Reload": "Are you sure you want to reload all Snapfix tasks?" with "Yes" and "No". An info control next to "Reload" explains that it clears Snapfix data and downloads a fresh copy.
* iOS Settings "Reload Snapfix App": a sheet titled "Reload" with the same question.
* Android: a sheet titled "Reload" with the same question, "Yes" and "No"; "Yes" runs the storage check above.

**On the screen:**

* **No sites:** compared against the server message "user is not part of any business!". iOS, when the site request returns it: "Your login was successful but it appears that you are not assigned to any Account or Group. Please contact your administrator or contact Snapfix (<support@snapfix.com>) in order to resolve this situation. Please try to login again once this issue has been resolved."; when the group request returns it, the same text with "any specific Group". Android always shows the "any specific Group" text. "Ok" signs out. The iOS texts are fixed in code, not in the string file.
* **Download failed:** "Account details not found." / "Please contact to administrator.". iOS: "Ok" starts again, "Logout" signs out. Android: "Retry" and "Logout".
* **No connection (Android):** described under Offline.

Signing out from these dialogs clears the local session. On Android it also resets the walkthrough-seen flag, so the next launch shows the [walkthrough](https://docs.snapfix.com/how-the-apps-work/screens/account/walkthrough.md) again, and keeps the terms-accepted flag.

## Platform differences

| Topic                    | iOS                                             | Android                           |
| ------------------------ | ----------------------------------------------- | --------------------------------- |
| Failure                  | Three silent retries, then the alert            | Wipe, then the alert at once      |
| No connection            | No check here; counted as a failed attempt      | A dialog whose "Cancel" signs out |
| No sites                 | Two messages: site request versus group request | Always the group message          |
| Empty site list          | The screen stalls                               | The group request is still sent   |
| Next screen              | Home tabs, Fix                                  | Group list                        |
| Logo above the animation | No                                              | Yes, hidden on a small screen     |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.snapfix.com/how-the-apps-work/screens/account/download-data.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
