The TroopWebHost mobile app maintains a copy of much of your pack's data in your device's local memory.
This lets the app run faster and also allows you to use the app when you do not have an Internet connection, like when you're on a wilderness campout.
Whenever you open a page in the app, it first pulls the information from local storage and displays that on the screen.
If you have access to the Internet, it will then check to see if there are any recent changes to this information available from the server.
If any of the data has changed, it will then redisplay the page. This process usually happens very quickly, depending on your connection speed.
Most functions in the app will work when you do not have Internet access. The primary exception is signing up for events.
You must have Internet access to sign up for events so we can verify your current eligibility for that event, which may be restricted based
on membership in a dynamic subgroup or other requirements.
While you are off-line, any information you enter into the app - including taking attendance and signing off on requirements - will be stored in a queue
in your device's local memory. Once you regain Internet access, those updates will be applied to the server.
You can view any pending updates from the General Settings page of the app; scroll to the bottom of that page to find the button View Update Queue.
While this rarely happens, your updates may fail to be applied to the server if someone else changed that same information since you last accessed the server.
This prevents you from overwriting their changes. For that reason, you should only have one leader take attendance in the app for any particular event.
Full Data Download
When you log on to the app for the first time, it will do a full data download from the server, which looks like this:
The same process runs when you tap the Reload Data button from the General Settings page.
This process builds a new database on your device and downloads a complete copy of your pack's information into that database.
While it usually downloads 100% of the data for each table, there is one table which is only partially loaded to save time:
- Event Participants. This table stores the signup status for each member of your pack for each event in your calendar.
So if your pack has 100 members and 200 events on its calendar, it can contain 20,000 rows! That's a lot of data to download at one time, so we begin by
just downloading the participant records for the most recent past events and the next few upcoming events.
As you use the app, it will continue to load data into the Event Participants table every time you access the Home page, the Calendar, or the Directory.
This happens in the background and won't be noticeable. In addition, whenever you open an event from the calendar it will instantly download the participants for that event if they
are not already present.
Incremental Data Refresh
On the server, we track every time a row has been inserted, updated or deleted. From time to time, the app will perform an incremental data refresh that pulls these
recent changes from the server. This happens when:
- You tap the Refresh Data icon on the Home page.
- If the app has been left running in the background on your device, every 12 hours it will run an incremental refresh. This may not work on all devices.
- When you upgrade to a new version of the app, it run an incremental refresh. If this version made changes to the structure of a local table, this may require
that table to be recreated and completely reloaded.
- If none of the above has happened in the past week, the next time you open the Home page it will run an incremental refresh.
As mentioned earlier, the app will also refresh individual tables as needed to ensure that you have current data for whatever page is being displayed.