runnerup icon indicating copy to clipboard operation
runnerup copied to clipboard

Allow using a different directory than Documents for local storage

Open karlicoss opened this issue 5 years ago • 3 comments

My usecase is that I want workouts to be stored in /sdcard/syncthing directory so I could sync them with my computer. I'd propose that if the pass supplied starts with /, just treat it as absolute, otherwise treat as relative to Documents (current logic).

Relevant bits of code: https://github.com/jonasoreland/runnerup/blob/a2e45e4353cf5421e49f0311c803062a29f4080f/app/src/main/org/runnerup/export/FileSynchronizer.java#L89-L97 https://github.com/jonasoreland/runnerup/blob/a2e45e4353cf5421e49f0311c803062a29f4080f/app/src/main/org/runnerup/export/FileSynchronizer.java#L239-L244

If it's welcome, I could find some time to implement it and do a pull request. Thanks!

karlicoss avatar Jan 11 '21 18:01 karlicoss

The problem is scooped storage in newer Android versions. An app only has access to its specific directories. With older Android than 10 it is possible. This piece of code need to be changed when targeting Android 11 (before next fall) as getExternalStoragePublicDirectory() is not supported then.

gerhardol avatar Jan 11 '21 20:01 gerhardol

Ah I see, thanks for explaining! Quite annoying... I guess feel free to close considering it can't really be solved. I have root anyway so I guess can set up a script mirroring the files to a synced folder.

karlicoss avatar Jan 11 '21 20:01 karlicoss

You can use Taipiriik

pon., 11 sty 2021, 21:48 użytkownik karlicoss [email protected] napisał:

Ah I see, thanks for explaining! Quite annoying... I guess feel free to close considering it can't really be solved. I have root anyway so I guess can set up a script mirroring the files to a synced folder.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jonasoreland/runnerup/issues/999#issuecomment-758213979, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGI4ZSEZG6XAT2VAFZCCK3SZNP3LANCNFSM4V56FVZQ .

Marx2 avatar Jan 12 '21 06:01 Marx2