B
B
boomwest2015-03-24 13:42:35
Android
boomwest, 2015-03-24 13:42:35

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

2 answer(s)
C
Copperfield, 2015-03-24
@boomwest

You think correctly.
Google Service + AlarmManager.

I
ivanfenenko, 2015-03-25
@ivanfenenko

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 question

Ask a Question

731 491 924 answers to any question