I was glad to implement smack on android via local Openfire server where it connects to Gmail server-host and it worked like charm. The tutorial found here
But I'm getting an error (pasted below) when I'm trying to connect two users via android emulators with a local Openfire server installed.
03-23 16:24:01.392: DEBUG/SMACK(233): 04:24:01 PM SENT (1155246128): <message id="t0tgA-5" to="justestingchat2" type="chat"><body>hi</body></message>
03-23 16:24:07.032: DEBUG/SMACK(233): 04:24:07 PM RCV (1155246128): <message id="t0tgA-5" to="justestingchat@admin-pc/Smack" from="justestingchat2" type="error"><error code="404" type="cancel"><remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></message>
03-23 16:24:07.062: INFO/System.out(233): Received message: null
Here are some of my system level description:
Presence presence = new Presence(Presence.Type.available);
Packet Listener
as provided in the tutorial above code
Please can some one help me what's actually wrong? If it could work with google talk why not local server? Or is it may be because of using emulator?
UPDATE 1:
For finding out where the problem is! I downloaded Spark client and did some testing. I have found out that I'm able to send packets/messages from Spark to Android Client but not from Android to Spark, which gives me a Error 404! Can any one still help me with atleast some clues please?
Your Android code is wrong. You are sending your message to a Jid which does not include the xmpp domain justestingchat2. Try to send your message to justestingchat2@admin-pc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With