[Q] How to synchronize data in MySQL server with Android app?
I want to implement a communication from my website to my Android app.
So if I send a message from my website, it should immediately show up on my phone.
I am working on this website using PHP and MySQL, so that this message can be sent to my web server.
However, if I want to have this message on my phone, I have to get this message from the server.
Then the phone has to do busy waiting all the time and this will be very inefficient, since it only has to get it whenever I send a message on my website.
How can I have the message shown up on my phone immediately without busy waiting all the time?
I am planning on expanding this functionality to other users and multiple messages, so I don't think socket communication is proper here.
What should I do?
In other words, is there any way that the server can actually 'send' the message to the phone when it receives a message?