powered by Jive Software

Save Messages

I am using the smack API with an openfire sever and I am trying to implement an XMPP client on a mobile device (emulator just now).

I have a connection set up and am able to pass messages between 2 clients.

However if a client has more than one “conversation” at the one time, then this will obviously mean that only one conversation can be shown on screen at once.

What I was wondering was how to save any messages that have already been sent so that when a client moves from one screen to another (i.e one conversation to another) then when they return to a previous conversation that has already begun I can reload what has already been sent.

I hope that wasn’t too hard to follow

Thanks in advanced.


please move your thread to the Smack forum.

I’d say that you want to store the messages in a local array.

I wonder how useful such an UI will be. I’ve seen UIs which look like:

Foo: Hello Joe

Foo: Hello Foo

Foo: How are you?

Bar: Hello Joe

Foo: I need some help

Bar: Hello Bar

[>Foo] {user can write here}

[>Bar] {user can write here}

So all p2p chats are displayed in one UI. (Also MUC and private MUC messages are possible this way.) Every user has a special color and a short roster name. For every conversation a new input box is added, limited to ‘n’ (usually 3) input boxes.

[>…] is a dropdown box. So one can select where to send the message and even start a new conversation.


Thanks for the advice LG, I was leaning towards the local array myself, I’ll have a look into this when I get a chance.

p.s thread moved