Subject: Problem sending presence
In my application I set AutoPresence = true and I also tried setting the following:
I have established two way communication with an Android app and my app (see the last two lines of xml) but the Android app never sees my client as anything other than offline.
- // sgc, none of this seems to make any diffrence
- p.Type = PresenceType.available;
- xmppCon.Send(p);
- xmppCon.Status = "OnLine";
- xmppCon.Show = agsXMPP.protocol.client.ShowType.chat;
- xmppCon.SendMyPresence();
I have established two way communication with an Android app and my app (see the last two lines of xml) but the Android app never sees my client as anything other than offline.
- Send: <stream:stream to='lightwitch.org' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
- Recv: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xml:lang="en" id="0919242f-bd86-4793-8ff8-f39bebf4cfd5" from="lightwitch.org" version="1.0" >
- Recv: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" /><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>SCRAM-SHA-1</mechanism></mechanisms></stream:features>
- Send: <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
- Recv: <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
- Send: <stream:stream to='lightwitch.org' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
- Recv: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xml:lang="en" id="1b54e0a5-bb88-41f8-978b-a89daa5c81d8" from="lightwitch.org" version="1.0" >
- Recv: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism><mechanism>EXTERNAL</mechanism><mechanism>SCRAM-SHA-1</mechanism></mechanisms></stream:features>
- Send: <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="SCRAM-SHA-1">biwsbj1iaWdnZXJwYyxyPS9sdmRPYXA2b1hPKzl3VWRWTHpuaEx6MjQwSm14VDhY</auth>
- Recv: <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cj0vbHZkT2FwNm9YTys5d1VkVkx6bmhMejI0MEpteFQ4WDE2YWQyZGMwLWZiYjEtNGE1MC1hYjlkLTVhZmEzYTMxOGQzOSxzPU5HVm1NekE0WkRrdE5XVmtPQzAwTW1KbUxXSTJaamN0T0dSbE9EbGlNV0ZoWVdaaixpPTQwOTY=</challenge>
- Send: <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">Yz1iaXdzLHI9L2x2ZE9hcDZvWE8rOXdVZFZMem5oTHoyNDBKbXhUOFgxNmFkMmRjMC1mYmIxLTRhNTAtYWI5ZC01YWZhM2EzMThkMzkscD1MMkI0MDhIUEszREhQRnl1RzVEU2FEVlRvNzA9</response>
- Recv: <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl">dj1FUGlkZi9hUE8rclVHUXdXaG01RklwUmJEMUE9</success>
- Send: <stream:stream to='lightwitch.org' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
- Recv: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xml:lang="en" id="ef3ac7c3-f554-4ad8-a31e-a069c8628068" from="lightwitch.org" version="1.0" >
- Recv: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><c xmlns="http://jabber.org/protocol/caps" node="http://lightwitch.org/metronome" ver="P9PJszr3/Ggzh4twC5j/sbMCktM=" hash="sha-1" /><ver xmlns="urn:xmpp:features:rosterver" /><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><required /></bind><session xmlns="urn:ietf:params:xml:ns:xmpp-session"><optional /></session></stream:features>
- Send: <iq id="agsXMPP_1" type="set"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>agsXMPP</resource></bind></iq>
- Recv: <iq xmlns="jabber:client" id="agsXMPP_1" type="result"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>bpc@lightwitch.org/agsXMPP</jid></bind></iq>
- Send: <iq id="agsXMPP_2" type="set" to="lightwitch.org"><session xmlns="urn:ietf:params:xml:ns:xmpp-session" /></iq>
- Recv: <iq xmlns="jabber:client" to="bpc@lightwitch.org/agsXMPP" id="agsXMPP_2" type="result" from="lightwitch.org" />
- Send: <iq id="agsXMPP_3" type="get" to="lightwitch.org"><query xmlns="jabber:iq:agents" /></iq>
- Send: <iq id="agsXMPP_4" type="get"><query xmlns="jabber:iq:roster" /></iq>
- Recv: <iq xmlns="jabber:client" to="bpc@lightwitch.org/agsXMPP" id="agsXMPP_3" type="error" from="lightwitch.org"><error type="cancel"><service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /></error></iq>
- Recv: <iq xmlns="jabber:client" to="bpc@lightwitch.org/agsXMPP" id="agsXMPP_4" type="result"><query xmlns="jabber:iq:roster" ver="1" /></iq>
- Send: <presence><status /><priority>5</priority></presence>
- Send: <presence><show>chat</show><status>Online</status></presence>
- Send: <presence><show>chat</show><status>OnLine</status><priority>5</priority></presence>
- Recv: <presence xmlns="jabber:client" from="bpc@lightwitch.org/agsXMPP"><status /><priority>5</priority></presence>
- Recv: <presence xmlns="jabber:client" from="jm@lightwitch.org" type="subscribe" />
- Recv: <presence xmlns="jabber:client" from="bpc@lightwitch.org/agsXMPP"><show>chat</show><status>Online</status></presence>
- Recv: <presence xmlns="jabber:client" from="bpc@lightwitch.org/agsXMPP"><show>chat</show><status>OnLine</status><priority>5</priority></presence>
- Recv: <message xmlns="jabber:client" to="bpc@lightwitch.org/agsxmpp" id="T4Qae-1688" type="chat" from="jm@lightwitch.org/androidBHriiX27"><body>Hello</body><thread>87OGV7bkPi1x</thread><request xmlns="urn:xmpp:receipts" /></message>
- Send: <message type="chat" to="JM@lightwitch.org"><body>Hi back</body></message>

Edit reason: Please use code and xml formatting in future posts