Answer the question
In order to leave comments, you need to log in
How to backup data in android application?
Всем привет. Столкнулся с вопросом. В приложении имеется база данных. Необходимо ее, по желанию пользователя, сохранять где нибудь в сети интернет. При чем нет разницы, файлом базы или просто пересылать данные. Подскажите в каком напровлении начать изучение? Читал про firebase, но пока толком не понял как можно реализовать. Конкретно интересует:
1. Какое хранилище выбрать (лучше конечно какое нибудь облако)?
2. По средствам чего производить сохранение и считывание?
П.с. база не обьемная.
Answer the question
In order to leave comments, you need to log in
The most obvious answer is Google Drive. Most Android users have a Google account, the API is public and there are a lot of examples around.
And by analogy - Dropbox .
Both solutions are free for both the developer and the user, with several tens of thousands of daily synchronizations in their project, up to 10 people a month report problems, but the problems are usually temporary and possibly local.
2. it is best to backup the database using the application that uses the database.
the application flushes the database buffers to disk, closes the database - i.e. base on disk in a fully consistent state. after which the database file is sent to the specified cloud (you can still compress it a bit). after which it connects to the database and continues to work.
the question "where" to decide with the user - ie. add new repositories upon request. For example, I pour backups on my home FTP.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question