I
I
ilnazoon2015-04-03 13:18:57
Android
ilnazoon, 2015-04-03 13:18:57

How to make network requests via REST API in Android?

Good afternoon, comrades!
My question is the following. There is a task - to create an application that communicates with the site through the REST API of the site. For the requests themselves, I'm thinking of using an IntentService.
What mechanisms to use for requests? How to notify the activity about received data?
And how can I make the IntentService periodically poll the site?

Answer the question

In order to leave comments, you need to log in

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

If you suddenly change your mind about reinventing the bicycle, check out the Rest section here.

I
IceJOKER, 2015-04-03
@IceJOKER

For the requests themselves, I'm thinking of using an IntentService. - IntentService / Service / BoundService depends on the specific task, here you choose what you need.
What mechanisms to use for requests? - the mechanism for sending a request to the server, what answer did you expect?
How to notify the activity about received data? - search on the topic of communication between the service and the activity, Handler / (Local) BroadcastReceiver
And how to make the IntentService periodically poll the site? - Alarm/TimerTask/Handler

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question