Missing Offline messages asmack (Android)

Hi some one pls help me

I have offline messages option enabled in the openfire server.But I’m unable to get offline messages

User A is online ,User B is online in this case I’m able to get messages.

Now User B Turned off his WiFi(Note : User A waited till the user B Session completely killed in the server ) now User A sent a message to User B

in this case I’m able to see the message in the openfire offline table. Now User B Comes online again server is sending the message to user B as the server come to know that User B is online

(Message disappeared from offline messages table ).But User B is not going to receive that message.

My code:

connection.login(userName, userPwd, UiUtility.getMyPhoneNO());

PacketFilter filter = new PacketTypeFilter(org.jivesoftware.smack.packet.Message.class);

packetListener =new PacketListener() {

public void processPacket(Packet packet) {

Message message = (Message) packet;

if (message.getBody() != null) {

String fromName = StringUtils.parseBareAddress(message


Log.i(“XMPPClient”, “Got text [” + message.getBody()

  • “] from [” + fromName + “]”);




connection.addPacketListener(packetListener, filter);

Please Help me.