title: how to get delivery status of message in smack or in xmpp from android
body: <p>This is my code and i am sending my message in this method but not able to get delivery message in DeliveryReceipt</p>
  
  <pre><code>    newChat.sendMessage(message);
              newChat.getListeners();
              newChat.addMessageListener(new ChatMessageListener() {
                  @Override
                  public void processMessage(Chat chat, Message message) {
                      Log.d(TAG,"DeliveryReceipt3:"+"1:"+message.getThread()+"2:"+chat.getThreadID()+"3:"+message.getBody());
                  }
              });
  </code></pre>
  
  <p>the above code is for sending message and below code is for getting DeliveryReceipt</p>
  
  <pre><code>   Message m = new Message();
                  m.setType(Message.Type.chat);
                  m.setFrom(connection.getUser());
                  m.setTo(agentId);
                  m.addExtension(new DeliveryReceipt(m.getPacketID()));
  
                  DeliveryReceipt dr = (DeliveryReceipt)m.getExtension(DeliveryReceipt.ELEMENT, DeliveryReceipt.NAMESPACE);
                  Log.d(TAG,"DeliveryReceipt1: "+"1:"+dr.getElementName()+"2:"+dr.getId()+"3:"+dr.getNamespace()+"4:"+dr.toXML()+"4:"+dr.toString());
                  Log.d(TAG,"DeliveryReceipt2: "+"1:"+m.getBody()+"2:"+m.getStanzaId()+"3:"+m.getThread());
  </code></pre>