Android asmack received iq packets are formatted in wrong way

I am using asmack for implementing chat client application. I am sending an IQ request for fetching previous chats. Though I get all previous chats some of them are broken. Actually output should be off following order:

<iq id="IQRequestPubSubItems" to="someid" from="" type="result"> <pubsub xmlns=""> <items node='some_node_id'> <item id='55812E6AAF0EB'> <entry xmlns="mcn:panel"> <body>New image</body> <imagename>file.6</imagename> <file name="public-380" type="image/jpg"/> <published jid="some_id" datetime="2013-05-09T05:30:18Z"/> </item>

But I am getting response as follows:

<iq id="IQRequestPubSubItems" to="someid" from="" type="result"> <pubsub xmlns=""> <items node='some_node_id'> <item id='55812E6AAF0EB'> <body>New image</body> <imagename>file.6</imagename> <file name="public-380" type="image/jpg"/> </item> <published xmlns="mcn:panel"> </published>

Iam using asmack6 on Android API 17. When checked on server they are sending it correctly. Also when I enabled debug on aSmack I see that it receives proper message but when I get the Packet in my Android app's PacketListener it gets broken.

Category:android Views:2 Time:2013-05-10

Related post

  • Android never receives UDP packet 2010-01-20

    The below code results in a timeout. It works fine on non-Android Java. What's the matter? //@Override public static void run() { //System.out.println ( "Local Machine IP : "+addrStr.toString ( ) ) ;"Trace 1"); try { //

  • Android 3.2: Receive UDP packets does not work? 2011-11-17

    I am programming an Android tablet app. It communicates via UDP messages (13 bytes data each). Sending these packets works correctly. But when I try to receive unicast UDP packets on port 15731 (and on other ports as well), it always returns IOExcept

  • how can i receive data packets in GPRS in my android mobile? 2012-04-16

    I need to receive data packets send from a GSM modem through GPRS with my android mobile... can any one help me how to send and receive.. what protocol has to be used? --------------Solutions------------- Create a Thread in server starts and do the f

  • Android not receiving broadcast UDP, but receiving directed UDP 2011-10-13

    I'm having an issue where my Android device (An HTC Incredible running stock 2.3.4 rom) is not able to receive a broadcast UDP, but when I get the IP of the device (on the same network) and send the packet directly to the IP, the phone immediately re

  • Help with Sending/ Receiving UDP packets - C Sockets 2009-07-24

    Ok, if you look at some of my previous questions, I've been working on getting a simple connection up and running with C sockets (I'm still fairly new to the whole networking aspect of an program, but everyone has to start somewhere, right?). I've in

  • Which Packet Capture Format is better? 2010-01-08

    I am writing an application to save the captured IP packets to file. Which of the following packet capture format is better suited for use as the file format? Click on the link for more information on each. Snoop (rfc1761) PCAP In addition, is there

  • Tomcat6 can't connect to MySql (The driver has not received any packets from the server) 2010-01-31

    i'm running an Apache Tomcat 6.0.20 / MySQL 5.1.37-lubuntu / sun-java6-jdk /sun-java6-jre / sun-java6-bin on my local machine using Ubuntu 9.10 as OS. I'm trying to get a simple DB-query example running for 2 days now, but i still get this Exception:

  • Received UDP packet length 2010-02-12

    How to get the length of received UDP packet? Using wireshark I could see the correct length of datagram. How can I print this value in my simple udp server program? I am receiving binary data (Non printable ascii characters as a data) So I can not u

  • Multiple sockets receiving same packet 2010-08-16

    I have a C++ program written with Winsock that has multiple blocking sockets operating in multiple threads. They are all waiting at recvfrom(), and when I send a packet to one of them, they all get the packet. Here is how they are declared: _sock = s

Copyright (C), All Rights Reserved.

processed in 0.069 (s). 11 q(s)