开发者

sync remote database (mysql) with sqlite database and vice versa

In my android app I need to sync SQLite database with remote database (mysql) and vice versa....

the concept is something like when application launches application should sync database from remote database.. when I perform some action data should save into sqlite and then sync it to remote database..

Please gu开发者_如何学Goide how to perform this task.

Thanks in advance....


you can write an android service which can be called when the applicaiton starts. this service will start syncronization in the background while the application can fetch data from the database.

UPDATE

here is a sample tutorial for database.


  1. Log all your statements in a table
  2. Send them to the server via http
  3. Execute statements there on the server (ensure that there is no duplication by giving statements a serial no)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜