Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Backup & Restore #2302

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

jaredly
Copy link

@jaredly jaredly commented Feb 15, 2024

as requested in #1668 and #2103

I'm quite interested in being able to transfer read information, as I'm switching to a new phone and am in the middle of quite a few books 😅

NB I haven't written very much kotlin, so it's entirely likely that I've organized things weirdly. Let me know how you'd like things to be rearranged! I was pretty much just blundering around to get it to compile & work 🙃

But at the end of the day, it does work! I based my implementation fairly loosely on https://stackoverflow.com/a/73205884/290784. I'm exporting the whole sqlite file (including journaling files) as a .zip archive, and then to restore, I overwrite whatever sqlite database exists & restarting the app.
(It might be worth putting up an alert or something saying "Restoring will delete all your current data!" but I wasn't sure how to make an alert)

Here's a video of it in action:
https://github.com/PaulWoitaschek/Voice/assets/112170/d512e8b8-2762-4945-8a54-11ac84c3c952

@@ -14,3 +14,4 @@ org.gradle.unsafe.configuration-cache=true
voice.signing.play=false
kotlin.daemon.useFallbackStrategy=false
org.gradle.kotlin.dsl.allWarningsAsErrors=true
org.gradle.jvmargs=-Xmx2g
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was required for me to be able to build the project the first time, but I can back it out if you want

@jgilmore
Copy link

jgilmore commented May 4, 2024

Yeah, good to know this isn't implemented yet. Too bad I can't see the reading positions on my old phone, since the SD card that had the books on it has been moved to the new phone already.

So I'm SOL I guess.

So I guess I should ask if this pull request backs up and restores the reading positions even for books that are no longer available on the device?

@jaredly
Copy link
Author

jaredly commented May 5, 2024

@jgilmore I believe it does

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants