Smack android service question

Hi can someone give me a example on how to achieve this ??

The whole chat system should be separated from UI. And UI should simply “bind” to the chat “stream” to send/receive data. This would let you to switch between chats and these “invisible” chats could still receive messages from your parties. Also you want your app to be able to receive messages even when app is “in background” so there’s not really any other choice. Not to mention that approach would help you building i.e. UI for tablet with more than one visible chat.

I suggest having a look at the source of the various open source Android XMPP apps that use (a)Smack. yaxim and Project MAXS transport-xmpp come into my mind.

Thank you i’ll take a look at them or is there another way i can chat with multiple users one on one (not muc) and switch between the chats ?? thats basically all i want to know