How to create a communication layer in android

Posted by Palo on Stack Overflow See other posts from Stack Overflow or by Palo
Published on 2010-04-13T09:52:36Z Indexed on 2010/04/13 12:42 UTC
Read the original article Hit count: 282

Filed under:

I want to create a communication layer in android. The layer will communicate with server asynchronously. Multiple activities should be able to call methods of the communication layer. The layer will get messages from the server (it is not important for the scope of this question how) and should be able to tell activities to do some work based on these messages.

How should I implement this? Should I do this using android Service?

The main questions that I need to answer are:

How can activities access the layer?

How can the layer access activities?

How can i make the communication layer live for the lifetime of the application?

© Stack Overflow or respective owner

Related posts about android