I am working on an android(Java) project where I want to update my SQLite database with a remote MySQL database info.
Initially I want to create the SQLite DB as exact remote MySQL database. After that Application normally deal with the SQLite DB.
Then when application shut down and start again if any modification happened to remote MySQL database I want to sync sqlite database with the MySQL database info.
Can anyone give any idea how I can accomplish this task. Thank you
You can use android service API android.app.Service for achieving this.
You just have to run a service which will check the server database changes and if there is changes get the data from the server.
But to run that service you have to write a BroadcastReceiver which will tell service to run after specified time or after application started depending upon the requirement
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With