Wednesday, 18 September 2013

Asynchronous HTTP response Android

Asynchronous HTTP response Android

I am trying to do the following and am looking into other people's
experiences:
I want to have an HTTP server running on Android that receives GET
requests from a client. From there, the server must deliver the query
parameters to a Service that will do some processing (sometimes quite
heavy). When the service is done, it sends back the data to the server
that will then return the response.
Of course, the startService(intent) call is asynchronous so I'm wondering
how to tell the server to wait for the processing to be done before
sending back the response. At the moment, the inter process messaging is
done with the Messenger and Message classes.
What sort of design would be able to achieve that?

No comments:

Post a Comment