问题
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