I have an application that it makes requests to a webservice REST created using PHP. It's working perfectly my application makes requests and receive the data. But a want to know how can I make in my application to sincronize in real time with my server. It would be like an application messenger that receives the data automatically without an ask from user. How can I do it? Thanks
Asked
Active
Viewed 59 times
2 Answers
0
To keep your app synced with your server, run a looping Timer
on an interval in the background. Use it to check the server for new messages, and then feed those messages to the user.
Here a is an answer that may help you achieve this Android timer? How-to?.
-
So could I use services running in background? But using service my application wouldn't be very slow? – user3869064 Sep 02 '14 at 22:44