Synchronization
When you work offline, Scripvio stores changes in a local queue (SQLite on the device). As soon as the network is back, the app automatically drains that queue to the server — with no manual step in most cases.
Automatic trigger
Section titled “Automatic trigger”sequenceDiagram participant A as App participant L as Local queue participant S as Server Note over A: Network lost A->>L: Notes, journal, tracking queued Note over A: Network detected A->>A: Banner Syncing… A->>S: flushOfflineQueue (notes) A->>S: flushOfflineQueue (journal) A->>S: flushOfflineQueue (tracking) S-->>A: Server ids, ACK A->>L: Queue cleared or reduced| Event | Behavior |
|---|---|
| Local change | Queue count +1 — banner Changes are waiting… if online but not syncing |
| Network back | Banner Syncing with server… then upload |
| Success | Banner gone (queue = 0) |
| Partial / total failure | Sync failed… — queue kept, retry on next online |
The app listens for connectivity changes (connectivity_plus) continuously.
What is in the queue?
Section titled “What is in the queue?”The queue aggregates several operation types:
| Domain | Example operations |
|---|---|
| Notes | Creates (local_…), patches, deletes |
| Sections | Create, update, reorder |
| Note references | Structured verses (local_verse_…) |
| Journal | Creates, edits, pending publish |
| Tracking | Created or updated readings, prayers, meditations |
| Reminders (preferences) | Save deferred if API unavailable |
One global banner reflects the sum of these queues (not a per-type counter in the UI).
Order and send logic
Section titled “Order and send logic”| Principle | Detail |
|---|---|
| Sequential flush | Notes → journal → tracking (on each reconnect) |
| Create before patch | A local_… note is created on the server before dependent patches |
| Network failure | Rows stay in queue (treatDioFailureAsDeferredSync: timeout, 5xx, no network) |
| Cancelled request | Not queued by default |
You do not manage order manually; the app and server handle dependencies (e.g. note patch ACK).
After a successful sync
Section titled “After a successful sync”| Effect | Where you see it |
|---|---|
local_… → server id | Create lists, editors |
| Pending publish applied | Entry appears in Library after refresh |
| Tracking dashboard | Refreshed (chart, calendar) |
| Pending references | “Pending” badges removed |
Notifications (optional)
Section titled “Notifications (optional)”Depending on your account Notifications:
- Push: may signal sync done or failed (server / Firebase configuration) ;
- Email: summary possible after sync (product evolution).
Personal Tracking reminders are local — independent of this content sync.
Publish and sync
Section titled “Publish and sync”| Offline action | User message | After sync |
|---|---|---|
| Publish a note | Publish queued (offline). | Note published in Library |
| Publish journal | Publish queued (offline). | Journal entry published |
Until the server confirms publish, Library may not show content as published.
Multiple devices
Section titled “Multiple devices”| Situation | Risk |
|---|---|
| Same note edited on phone A (offline) and tablet B (online) | Possible conflict — last sync or server rules |
| Read-only on B while working on A | B shows old version until A syncs |
Sync failure
Section titled “Sync failure”| Symptom | Likely cause | Actions |
|---|---|---|
| Banner Sync failed… | API 5xx, timeout, unstable network | Stay online; reopen the app |
| Queue not draining | Recurring error on one item | Note the message; support |
| Data still visible locally | Normal | Nothing is “lost” on device until you sign out |
| Forced sign-out offline | Warning dialog | Confirm only if you accept losing local data |
Editor tooltips may show Waiting for sync or Sync failed — still saved on this device on some verses.
Actions that depend on sync
Section titled “Actions that depend on sync”| Action | Link to sync |
|---|---|
| PDF export | Offers Sync before export if queue not empty |
| Search → Add verse | Needs note/journal already on server |
| Tracking ↔ journal link | After stable server ids |
| Profile refresh | Pull profile = network |
Sign out and local purge
Section titled “Sign out and local purge”On sign out, Scripvio may clear cache and local queue on that device (especially if you confirm offline with unsynced data).
On sign in on a new device: download account data + initial cache (event types, etc.).
→ Profile
Check everything is synced
Section titled “Check everything is synced”| Indicator | “OK” state |
|---|---|
| Offline/sync banner | Gone |
local_… note | Replaced by numeric / server UUID id |
| Publish | Visible in Library |
| PDF export | Allowed without pre-sync dialog |
If the Waiting banner persists while online: keep the app in foreground a moment or reopen it.
Can I sync manually?
No dedicated button in the current UI — reconnecting and opening the app retriggers flush.
How long is the queue kept?
Until success, sign-out (purge), or reinstall.
Does sync use a lot of data?
Sends changes (JSON), not the full catalog — reasonable on mobile.
Background sync on iOS/Android?
OS-dependent; reopening Scripvio after network is most reliable.
Related guides
Section titled “Related guides”| Topic | Link |
|---|---|
| Offline mode | Offline mode |
| FAQ | Offline and sync |
| Notes | Draft and publish |
| Library | Drafts and published |