A
A
artem2021-02-27 23:35:12
Android
artem, 2021-02-27 23:35:12

How to copy data from the database (from the old to the new one) when updating the application?

Hello, I've run into some confusion. I need to copy data from the old database, in the installed application, to the new one (when updating the application or reinstalling it), I googled the methods that need to be inherited from the SQLiteOpenHelper class, but I didn’t know how and where they get information about the old database.
How can I transfer data from the old database to the new one if I, for example, reinstall the application? I just want to start getting into it, so don't throw out some super duper solutions for seniors. Thank you understanding people.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GavriKos, 2021-02-27
@arteqrt

When you update the application, all data is saved
. And when you reinstall it, the deletion occurs first. And nothing remains. Option for reinstallation - store data not locally, but on the server

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question