runnerup icon indicating copy to clipboard operation
runnerup copied to clipboard

Use system file picker (SAF) for DB export/import

Open roberi opened this issue 3 months ago • 3 comments

Previously, database exports were saved to app-private storage, making it difficult (if not impossible) for users to access the database file outside of RunnerUp. This PR refactors the database import and export functionality from using app-private storage to using the Storage Access Framework (SAF). This framework allows users to interact with a system picker to select files from shared storage, not requiring any system permissions. For RunnerUp, users may now choose where their database backups are saved and accessed from.

Fixes #1083. Fixes #1153.

TODOs (separate PRs):

  1. Add confirmation prompt before overwriting existing DB when importing (#1089).
  2. Backup the current DB before overwriting.
  3. Enable direct DB file opening from file managers via AndroidManifest intent filter.
  4. Handle existing DB export in app-private storage (move to shared storage).

roberi avatar Sep 18 '25 10:09 roberi

The string resource Maintenance_explanation_summary needs to be updated. Current value:

RunnerUp saves workouts into a SQL-database.\nFor maintenance, the file runnerup.db.export can be imported and exported from/to\n%1$s

Since it's already translated into all languages, how do I update the text? @gerhardol?

roberi avatar Sep 18 '25 10:09 roberi

Since it's already translated into all languages, how do I update the text? @gerhardol?

You update the code, all translatable text in the preferences. The translations is in Transifex, somehow described. sources are pushed to Transifex, translators should be notified and update gaps. This project pulls the translations.

Around releases I usually do that loop a couple of times, see some of my commits. Can do that here too.

gerhardol avatar Sep 18 '25 13:09 gerhardol

Can do that here too.

Thanks!

see some of my commits.

I still don´t understand. =(

The string resource I need to update is common.R.string.Maintenance_explanation_summary. It is already translated into 8 other languages. After I update the English text, do I delete these 8 other translations?

roberi avatar Sep 20 '25 17:09 roberi