THE OFFLINE APP AND THE OFFLINE CHANGE CYCLE ============================================= Parish Record Keeper members can use their phone to search the parish database WITHOUT a network connection, and record changes in the field that are later imported into the Parish Record Keeper application. WHAT YOU NEED ------------- - A phone with a modern browser (Chrome, Firefox, Safari). - A member login at parishrecordkeeper.com. - One online visit to set everything up. PART 1 - SETTING UP THE PHONE (once, while online) -------------------------------------------------- 1. On the phone, log in at parishrecordkeeper.com and open the members page. Tap "Offline app" in the menu. 2. Open the "Data" tab and tap "Download / refresh offline copy". The phone now holds a copy of the church records, the baptism book, the contribution accounts and the individual ledger. 3. Optional but recommended: set a PIN on the same tab. Anyone who picks up the phone then needs the PIN to open the parish data. 4. Install it like a normal app: - Android (Chrome): menu (three dots) -> "Add to Home screen" (sometimes shown as "Install app"). - iPhone (Safari): Share button -> "Add to Home Screen". A "PRK Offline" icon appears on the home screen. From now on, tapping the icon opens the app DIRECTLY - no network, no login, no browser address bar. The app and its data live on the phone; being online is only needed to download or refresh the offline copy (and, when online and logged in, the app quietly picks up program updates for the next start). Refresh the offline copy whenever you are online again - after each new upload of the database, the copy on the phone is outdated. PART 2 - USING THE APP OFFLINE ------------------------------ - Church records / Baptism book / Contributions work like the online members pages: same filters, same results. "Finances" shows a person's transactions like the online financial record. - "Use extended name search" also finds synonymous spellings (e.g. Peter / Petro / Petulo), using the same synonymous-names table as the Parish Record Keeper application. - The figures are always "as of the last download" - the status line at the top shows the date. Searching ALWAYS uses the offline copy on the phone, even when the phone is online; the network is only needed to download or refresh the copy (Data tab). EDITING (change notes): - "Edit" on a search result lets you correct fields of a church record or baptism entry. - "+ Contribution" records a contribution for a person (account, amount, date, for-year). - "+ New person" and "+ New baptism entry" record new records. IMPORTANT: nothing is changed in any database yet! Every edit is stored as a CHANGE NOTE on the phone (see the "Changes" tab). The search results show your pending corrections, but they only become real when they are imported into the Parish Record Keeper application on the computer (Part 3). PART 3 - GETTING THE CHANGES INTO PARISH RECORD KEEPER ------------------------------------------------------ 1. On the phone, open the "Changes" tab and tap "Export change file (_PRKCHG.txt)" (or "Share..." to send it directly by WhatsApp / e-mail). 2. Bring the file to the computer that runs Parish Record Keeper (e-mail, WhatsApp, USB cable - any way you like). 3. In Parish Record Keeper, open the Control Panel and click "IMPORT OFFLINE CHANGES (FROM PHONE)". (Technical alternative: press Ctrl+G, type importOfflineChanges and press Enter. The button is added once by running AddOfflineChangeImportButton the same way - see "Setup" below.) 4. Every change note is shown to you one by one: Yes = apply this change No = skip it Cancel = stop the import If the database value changed since the phone downloaded its copy, the dialog warns you ("ATTENTION: the database now holds ..."). If a change looks like a duplicate (e.g. the same file was imported before), the dialog warns you as well. 5. A report file (_result.txt) is written next to the change file, listing what was applied, skipped or failed. The changes are applied through the application's own machinery: edits go through the same code as typing in the forms (with the same logging and edit-time stamps), new persons get their personID and card the normal way, and contributions are booked like entries in the individual ledger. PART 4 - CLOSING THE CIRCLE --------------------------- After importing the changes: 1. Upload the database to parishrecordkeeper.com as usual (members page -> Upload a new database file). 2. On the phone, open the offline app while online and tap "Download / refresh offline copy". The phone now shows the corrected data, and the applied change notes can be deleted ("Delete exported notes" on the Changes tab). LONG STAYS WITHOUT NETWORK -------------------------- The app is built to stay available indefinitely without internet: nothing on the phone expires or deletes itself, and the app asks the browser to protect its storage from automatic cleanup (the Data tab shows "Storage is protected" once granted). For long visits outside network coverage observe these rules: - Set the app up properly BEFORE leaving: open it once online, download the offline copy, add the icon to the home screen, and check the Data tab says "Storage is protected". - Android with Chrome is the most dependable platform. On iPhone the app MUST be used from the home-screen icon (data of plain Safari tabs can be deleted by iOS after ~7 days of not using the site; home-screen apps are exempt). - Never "clear browsing data" / "free up space" for the browser while in the field - that deletes the offline copy AND any change notes that were not yet exported. - The "over 30 days old" notice is only a reminder that the data is getting stale; the app keeps working regardless. - If a PIN is set, do not forget it: there is no recovery in the field (removing the app data unlocks it but deletes the notes). SETUP (ONCE PER DATABASE) -------------------------- Before the button described in Part 3 is available, run this once from the Immediate window (Ctrl+G) in Parish Record Keeper: AddOfflineChangeImportButton This adds "IMPORT OFFLINE CHANGES (FROM PHONE)" to the Control Panel. It is safe to run again (it does nothing if the button already exists). The button can be dragged to a different spot on the Control Panel afterwards in Design View, like any other button. NOTES FOR THE ADMINISTRATOR --------------------------- - The offline copy on the phone is NOT encrypted; it relies on the phone's own screen lock plus the optional PIN of the app. Do not put the offline copy on phones that are shared with people who should not see the parish data. - The change file (_PRKCHG.txt) contains plain-text parish data. Delete it after the import. - Several phones can record changes independently; import the files one after the other. Conflicting edits are caught by the "ATTENTION: the database now holds ..." warning during review. - The web pieces are: offline.php (the app), snapshot.php (the data download), offline_sw.js (offline caching), offline_manifest.json. The Access piece is Module10_OfflineChanges.bas.