Hello I'm new to Android development is there any way to automatically fetch data(Retrofit2) from webserver (MySQL) to my Room database Android i have a web application and Android application sharing database records insert/update. now in my case, i want to sync the android application when there is a change or new data records inserted by the web application
as of now im using retrofit2 and room database for my android application and as per my database im using MySQL
Im creating a inventory system so it is a must for both application the realtime inventory count for each other.
Please help. thank you
R&D for this issue, using retrofit and automatic sync data
You have 2 platforms, website and android. When updating data on the web you want to sync for android. This requires android to know when its data is getting old compared to the actual data. Knowing that android will call back to the server to get the latest data and put it in the Database . Using the data returned by Flow from the room database will help you get the latest changes from the database. Hope to help you!