Handler
in Android uses a MessageQueue
to access the stored messages. Using a Bound Service
the clients send messages, which are queued, and handled by the Handler. This creates a problem that the handler is able to handle only one message at a time. While this is OK for one-way messages, when the clients are expecting a reply, they receive it after a while. This creates problems as large number of messages are queued in, which take a lot of time.
- If a
Service
wanted to handle multiple requests at a time, how could that be done? - Can multiple Handlers attach to the same MessageQueue and handle multiple requests?
- Related to this, what in general, is the rule to receive reply from the