cavea

πŸ”„ Shared mode

Understanding and using Shared mode: indicators, lock, save, and clean exit.

General principle

In shared mode ☁️, the cave.db file is hosted on ☁️ Google Drive or ☁️ Dropbox. Multiple devices can access it, but only one can write at a time (exclusive lock).

Important: Cavea always works on a local copy of cave.db. All your changes (adding, consuming, moving…) are saved locally first. They are only uploaded to the shared cloud storage when you save β€” either manually or on exit. Without an explicit save, your changes remain on your device only and may be lost.

Indicators

A permanent icon in the navigation shows the active mode and lock status.

Mode icon (always visible)

Icon Meaning
πŸ’» PC (grey) Local mode β€” data on this device only
☁️ Cloud (blue) Shared mode β€” data on Google Drive or Dropbox

Lock icon (Shared mode only)

Icon Meaning
πŸ”“ Open padlock Write mode (green icon) β€” you hold the lock
πŸ”’ Closed padlock Read-only mode (amber icon) β€” another device holds the lock
↻ Spinning icon Save in progress (blue icon)
⚠️ Error icon Save error (red icon)

Buttons in Shared mode

In write mode πŸ”“

On PC (Windows / Linux): a πŸ’Ύ Save button appears in the navigation panel. It triggers an immediate upload to the cloud without closing the app.

On Android: two icons appear in the navigation bar:

In read-only mode πŸ”’

A πŸ”“ Take over button is shown. It lets you acquire the write lock if the other device has released it. A confirmation dialog appears before the lock is acquired.

Lock lifecycle

Startup

  1. Cavea creates a β€œlock” file on the cloud to signal it has the write token
  2. Cavea downloads the latest version of cave.db from the cloud
  3. The app opens in write mode πŸ”“

If another device already holds the lock: Cavea opens in read-only mode πŸ”’. A dialog offers to stay in read-only mode or quit.

Clean exit

On PC (Windows / Linux):

  1. Close the app window normally
  2. Cavea saves cave.db to the cloud and releases the lock
  3. Other devices can then acquire the lock

On Android:

⚠️ Do not use the Home button or task switcher to exit. The lock will not be released (other devices remain blocked in read-only) and any changes since the last save will not be uploaded to the shared cellar. On the next startup, if the lock still belongs to you, a dialog will ask you to choose between uploading your local changes to the shared cellar or reverting to the shared version.

Crash recovery

On the next startup, if the lock belongs to the same device:

Read-only mode β€” what is accessible

Feature Read-only mode πŸ”’
🍷 Browse stock βœ…
Filter / search βœ…
ℹ️ Bottle details (read) βœ…
πŸ“¦ Browse by location βœ…
History πŸ• βœ…
↔️ CSV export βœ…
βš™οΈ Settings βœ…
βž• Add bottles ❌
🍸 Consume / ↕️ Move / ✏️ Edit ❌
↔️ CSV import ❌

Switch cloud provider

In βš™οΈ Settings > Sync mode, tap Change provider. This clears the stored tokens and relaunches the setup wizard.

See also