I already have app, that makes http requests using Retrofit library to the server on PHP. Now my goal is to make some code work in my android app when server mysql database have some changes. I have no idea how to realise it, i already have read a lot information but i cant understand what should i use polling, websocket, FCM.
So, my questions are :
What is the best way to send data from PHP server to android app when Mysql database updates.
If i should use polling, how should i loop my request every 30 seconds?
Is it possible to make polling requests from Service, or it is a bad idea?
Comments
Post a Comment