Recieving Google Talk messages regardless if you sent an initial chat

Is there any way to set up an XMPP connection with Google Talk such that you recieve all messages sent to a user?

For instance, if I send a message from my Gmail page, my running gtalk client (on my pc) sees that I sent it and includes it in their history. Replies then go to both chat clients.

How can I set up my XMPConnection so that I also get those replies? I only listen for new chats and dont actually send anything chat replies out.


I can only see this working if the messages are sent to the base jid. Then (with Google Talk at least) all connected clients will recieve the message. In this case, you just need to create a ChatManagerListener or MessageListener to receive the incoming messages.

Silly question, but is it possible to login with a base jid?

Do you know if I can configure Google Talk to send messages to the base jid only?

Would connecting via be better than connecting through google’s servers?

Yes, but may depend on the client app.

Don’t know, but I think it already does that by default based on this discussion.

Not sure if it will make any difference.

Sorry, I am using Smack to listen for messages. Using XMPConnection and on login, I either need to specify a resource or Smack creates one. How can I specify that I want to use the base jid for login?

Some more background. I am connecting to gtalk with smack. I was hoping to listen for all messages sent to me regardless of the client that use to respond to the message. I get the first message with my smack XMPP packetlistener, but after I reply, I dont get anything anymore. So I am hoping that I can find a workaround…