I have an app that uses sqlite database and i would like it to be updated automatically each time the user is on line and there is a new version of the database. Can someone tell me how should i do this? P.S. I have google cloud storage. Thanks!
Asked
Active
Viewed 520 times
0
-
How you want updation, from sqlite to cloud or reverse ?? for both you can use android service – Sree Mar 26 '14 at 11:38
-
I want to be able to update sqlite database in cloud and to be automatically uploaded to the app when the user is online. – Pavle37 Mar 26 '14 at 11:50
-
First of all keep one flag in the db for updation, if any thing new happen make that flag in to true and if flag is true send to server, after send successfully make that flag false – Sree Mar 26 '14 at 11:59
-
I understand how it works, i don't know how i can load the db to the server and then load it onto the application. – Pavle37 Mar 27 '14 at 13:51
-
There is a lot of examples in the google itself, Use json/xml format to send data to server and write a web service to connect btween local and server – Sree Mar 28 '14 at 03:37
-
Okay, thanks, i have found what i was looking for, finally. – Pavle37 Mar 28 '14 at 12:07
1 Answers
1
I had a problem like that, but i resolved it differently.
It may not be the best way to do things, but it certainly helped me...
Try using dropbox to store your modified database and when the application has internet connection and when the user wants the update, just download that database and replace with the existing one.
Worked for me.

Pavle Pavlov
- 189
- 2
- 13