Is Typing notification

47 views
Skip to first unread message

Antriksh Mathur

unread,
Oct 11, 2009, 12:49:29 PM10/11/09
to jabber-net
hi,
I am a beginner to jabber-net. I want to make a Gtalk Client
application.
The problem I am facing is that I am unable to generate a notification
that the person I am conversing with is typing a message!
I was successful in displaying "is writing message" on the side of the
person I am conversing to!
I used the XEP-85 to do so, here is the code:-

public void SendIsTypingMessage(string Reciever)
{
jabber.protocol.client.Message msg = new
jabber.protocol.client.Message(XmppCon.Document);
msg.AddChild(XmppCon.Document.CreateElement("composing",
"http://jabber.org/protocol/chatstates"));

msg.Type = jabber.protocol.client.MessageType.chat;
msg.To = new JID(Reciever);
XmppCon.Write(msg);
}
public void SendTypingFinished(string Reciever)
{
jabber.protocol.client.Message msg = new
jabber.protocol.client.Message(XmppCon.Document);
msg.AddChild(XmppCon.Document.CreateElement("active",
"http://jabber.org/protocol/chatstates"));

msg.Type = jabber.protocol.client.MessageType.chat;
msg.To = new JID(Reciever);
XmppCon.Write(msg);
}


The code works fine, but I am unable to do the same on my side!
Please help me



thanks!

sincerly,
Antriksh Mathur

Joe Hildebrand

unread,
Oct 16, 2009, 4:01:35 PM10/16/09
to jabbe...@googlegroups.com
On Oct 11, 2009, at 10:49 AM, Antriksh Mathur wrote:

           msg.To = new JID(Reciever);

Note: you can just use Reciever here.  JID and string auto-convert between one another.

The code works fine, but I am unable to do the same on my side!
Please help me

You need to listen for the OnMessage, and look for elements in the http://jabber.org/protocol/chatstates
 namespace.

Antriksh Mathur

unread,
Nov 17, 2009, 5:10:26 AM11/17/09
to jabber-net
Thanks a lot for help!
it worked Fine!!!
:))
Reply all
Reply to author
Forward
0 new messages