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.
- Log all your statements in a table
- Send them to the server via http
- Execute statements there on the server (ensure that there is no duplication by giving statements a serial no)
精彩评论