Synchronize offline SQLite database with online MySQL database

谁都会走 提交于 2021-02-05 10:44:26

问题


I'm creating a Android application that store the data in online backend MySQL and store it in app sqllite. Which means when user is online, data sync with online backend database to sqlite database. When user offline, so he/she can use the sqlite data.is this proper way? Or what I can do to better solution ?


回答1:


You should be using Sync Adapters.

Checkout how it works in the following link and go further on the documentation for more info.

https://developer.android.com/training/sync-adapters/index.html



来源:https://stackoverflow.com/questions/39223635/synchronize-offline-sqlite-database-with-online-mysql-database

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!