Not logged in. · Lost password · Register
Forum: MatriX and XmppDotNet RSS
Avatar
martinbach #1
Member since Mar 2009 · 60 posts
Group memberships: Members
Show profile · Link to this post
Subject: How to get presence from connected and subscribed roster contacts?
Hi Alex,

in my WP7 (Bosh) App my roster gets updated if the app is connected and a subscribed contact (e.g. Tom) connects.  
But if Tom is already connected and my app connects to the server my roster doesn't get the info that Tom is online
(other clients do not have any problems so it seems that I have forgotten something in my still very basic MatriX code).

Do you have an idea what basic MatriX things I have to think about to get this work.
(Currently I have the code not with me)

Thanks and
best regards

Martin
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
There is nothing special you have to do in MatriX. AFter MAtriX got your roster and sent your initial presence the server MUST publish automatically all presences to you. And they come in automatically in the OnPresence event.

When you post a logfile of the session I can check if everything is fine.

Alex
Avatar
martinbach #3
Member since Mar 2009 · 60 posts
Group memberships: Members
Show profile · Link to this post
In reply to post #1
Hi Alex,

I tought so. It's so basic to xmpp to push the presence ...

I just realized that I have an earlier version on my phone which works correct.
So I have to find the wrong lines via comparing the code.

I will post my wrong code as an example after my return home.

Thank you

Martin
Avatar
martinbach #4
Member since Mar 2009 · 60 posts
Group memberships: Members
Show profile · Link to this post
Here is the solution of my problem:

I had a SendPresence in my OnBind which causes the problem:

private void xmppClient_OnBind(object sender, JidEventArgs e)
{
     xmppConnectionStatus.ConnectionStatus = "Login";

     xmppClient.SendPresence(Show.chat);  // <- Problem !!!
}

Martin
Avatar
Alex #5
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
so everything fixed now?

Alex
Avatar
martinbach #6
Member since Mar 2009 · 60 posts
Group memberships: Members
Show profile · Link to this post
Yes it is fixed now, thank you.

Best regards,

Martin
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters: