开发者

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

开发者 https://www.devze.com 2023-03-30 13:52 出处:网络
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

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

精彩评论

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