Answer the question
In order to leave comments, you need to log in
How to organize checking of messages on the server by interval?
It is necessary to check for new messages on the server with an interval of 10 seconds.
Do I understand correctly that you need to create a service in which a function is launched at intervals that makes a get request? In general, how to make the service perform a function at intervals, like email clients, social network applications?
Answer the question
In order to leave comments, you need to log in
If this is your server, then it might be better to notify the application of new messages via GCM.
This will save you from unnecessary server twitching.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question