This Question is Possibly Answered

1 "correct" answer available (10 pts) 2 "helpful" answers available (5 pts)
3 Replies Last post: Sep 26, 2008 6:23 AM by Seb  
buddyglass Bronze 1 posts since
Aug 7, 2008
Currently Being Moderated

Aug 7, 2008 1:59 PM

possible to send messages to yourself?

I'm attempting to create a monitor app that will send me a message (i.e. that I would receive in a graphical chat client) whenever certain things happen.  The code's pretty simple:

 

        XMPPConnection connection = new XMPPConnection("gmail.com");
        connection.connect();
        connection.login(user, pass);
        Chat chat = connection.getChatManager().createChat(dst, nullMessageListener);
        chat.sendMessage(txt);
        connection.disconnect();

 

Suppose my account is buddy@gmail.com.  If I set user = "buddy" and dst = "buddy@gmail.com", the code executes fine, but no new chat is opened in the graphical client.  If I set dst = "notbuddy@gmail.com", where "notbuddy" is another valid account, that person sees a new chat opened.

 

Is this a limitation of XMPP/Google Talk/Smack, or am I just doing something wrong?

 

As a workaround I could create an additional "buddybot" account that the app could use to log in, but I was hoping to avoid that.

slushpupie KeyContributor 711 posts since
Jan 27, 2006
Currently Being Moderated
Aug 8, 2008 9:15 AM in response to: buddyglass
Re: possible to send messages to yourself?

I can send messages to myself with Openfire.  I cant with google talk- so I think thats a google limitation.

buzhidao2008 Bronze 3 posts since
May 21, 2008
Currently Being Moderated
Aug 28, 2008 2:02 AM in response to: buddyglass
Re: possible to send messages to yourself?

Have you installed the IM Gateway plugin?

Seb Bronze 9 posts since
Jun 1, 2008
Currently Being Moderated
Sep 26, 2008 6:23 AM in response to: buddyglass
Re: possible to send messages to yourself?

Have you try without disconnecting ?

More Like This

  • Retrieving data ...