title: Unable to transfer files with asmack
body: <p>I have created a chat application and i am using asmack lib.
  I'm trying to transfer a file between two clients (Android app) on the same XMPP server, but I get a weird error.</p>
  
  <p>When I try to send a file, the outgoing file transfer begins, and the destination client receives the request, but the source client cannot go further in the transfer negotiation . I am always stuck in 'Negotiating Transfer'...</p>
  
  <p>Only managed to transfer files successfully, by sending a file from the mobile application to a desktop application (eg. Spark IM Client). </p>
  
  <p>Any idea what is causing this?</p>
  
  <p>Sending file:</p>
  
  <pre><code>OutgoingFileTransfer lTransfer = mFileTransferManager.createOutgoingFileTransfer(mJid+"/"+resource);
  // Send the file
  try {
      lTransfer.sendFile(new File(filePath),mMessage);
      } catch (XMPPException e) {
      Log.e(TAG,"Error sending file");
  }
  
  while(!lTransfer.isDone()){
      if(lTransfer.getStatus().equals(FileTransfer.Status.error)) {
          Log.e(TAG,"ERROR!!! " + lTransfer.getError());
          } else {
          Log.i(TAG, "Status:"+lTransfer.getStatus().toString());
          Log.i(TAG, "Progress:"+String.valueOf(lTransfer.getProgress()));
      }
      try {
          Thread.sleep(1000);
  } catch (InterruptedException ignored) { }
  }
  
  if(lTransfer.getStatus().equals(FileTransfer.Status.refused)
  || lTransfer.getStatus().equals(FileTransfer.Status.error)
  || lTransfer.getStatus().equals(FileTransfer.Status.cancelled)){
      Log.e(TAG,"refused cancelled error " + lTransfer.getError());
      return false;
      } else {
      Log.i(TAG,"Sucesss");
      return true;
  }
  </code></pre>
  
  <p>Receiving file:</p>
  
  <pre><code>mFileTransferManager.addFileTransferListener(new FileTransferListener() {
      public void fileTransferRequest(FileTransferRequest request) {
          String path = "/sdcard/"+ request.getFileName();
          IncomingFileTransfer lTransfer = fileTransferRequest.accept();
          lTransfer.recieveFile(new File(path));
          double percents = 0.0;
          while (!lTransfer.isDone()) {
              if (lTransfer.getStatus().equals(FileTransfer.Status.in_progress)) {
                  percents = ((int) (lTransfer.getProgress() * 10000)) / 100.0;
                  Log.d(TAG, "File transfer: " + newFile.getAbsolutePath() + " - " + percents + "%");
                  } else if (lTransfer.getStatus().equals(FileTransfer.Status.error)) {
                  Log.e(TAG, "ERROR in transfer");
                  return;
              }
              Thread.sleep(1000);
          }
          if (lTransfer.getStatus().equals(FileTransfer.Status.complete)) {
              Log.i(TAG, "File transfert: " + newFile.getAbsolutePath() + " - 100%");
              } else {
              Log.e(TAG, "ERROR in transfer");
          }
      });
  </code></pre>
  
  <p>ProviderManager configure</p>
  
  <pre><code>ProviderManager pm = ProviderManager.getInstance();
   //  Private Data Storage
          pm.addIQProvider("query","jabber:iq:private", new PrivateDataManager.PrivateDataIQProvider());
          //  Time
          try {
              pm.addIQProvider("query","jabber:iq:time", Class.forName("org.jivesoftware.smackx.packet.Time"));
          } catch (ClassNotFoundException e) {
              QuickLogger.w("Can't load class for org.jivesoftware.smackx.packet.Time");
          }
  
          //  XHTML
          pm.addExtensionProvider("html","http://jabber.org/protocol/xhtml-im", new XHTMLExtensionProvider());
  
          //  Roster Exchange
          pm.addExtensionProvider("x","jabber:x:roster", new RosterExchangeProvider());
          //  Message Events
          pm.addExtensionProvider("x","jabber:x:event", new MessageEventProvider());
          //  Chat State
          pm.addExtensionProvider("active","http://jabber.org/protocol/chatstates", new ChatStateExtension.Provider());
          pm.addExtensionProvider("composing","http://jabber.org/protocol/chatstates", new ChatStateExtension.Provider());
          pm.addExtensionProvider("paused","http://jabber.org/protocol/chatstates", new ChatStateExtension.Provider());
          pm.addExtensionProvider("inactive","http://jabber.org/protocol/chatstates", new ChatStateExtension.Provider());
          pm.addExtensionProvider("gone","http://jabber.org/protocol/chatstates", new ChatStateExtension.Provider());
  
          //   FileTransfer
          pm.addIQProvider("si","http://jabber.org/protocol/si", new StreamInitiationProvider());
          pm.addIQProvider("query","http://jabber.org/protocol/bytestreams", new BytestreamsProvider());
          pm.addIQProvider("open","http://jabber.org/protocol/ibb", new OpenIQProvider());
          pm.addIQProvider("close","http://jabber.org/protocol/ibb", new CloseIQProvider());
          pm.addExtensionProvider("data","http://jabber.org/protocol/ibb", new DataPacketProvider());
  
          //  Group Chat Invitations
          pm.addExtensionProvider("x","jabber:x:conference", new GroupChatInvitation.Provider());
          //  Service Discovery # Items
          pm.addIQProvider("query","http://jabber.org/protocol/disco#items", new DiscoverItemsProvider());
          //  Service Discovery # Info
          pm.addIQProvider("query","http://jabber.org/protocol/disco#info", new DiscoverInfoProvider());
          //  Data Forms
          pm.addExtensionProvider("x","jabber:x:data", new DataFormProvider());
          //  MUC User
          pm.addExtensionProvider("x","http://jabber.org/protocol/muc#user", new MUCUserProvider());
          //  MUC Admin
          pm.addIQProvider("query","http://jabber.org/protocol/muc#admin", new MUCAdminProvider());
          //  MUC Owner
          pm.addIQProvider("query","http://jabber.org/protocol/muc#owner", new MUCOwnerProvider());
          //  Delayed Delivery
          pm.addExtensionProvider("x","jabber:x:delay", new DelayInformationProvider());
          //  Version
          try {
              pm.addIQProvider("query","jabber:iq:version", Class.forName("org.jivesoftware.smackx.packet.Version"));
          } catch (ClassNotFoundException e) {
              QuickLogger.w("Can't load class for org.jivesoftware.smackx.packet.Version");
          }
          //  VCard
          pm.addIQProvider("vCard","vcard-temp", new VCardProvider());
          //  Offline Message Requests
          pm.addIQProvider("offline","http://jabber.org/protocol/offline", new OfflineMessageRequest.Provider());
          //  Offline Message Indicator
          pm.addExtensionProvider("offline","http://jabber.org/protocol/offline", new OfflineMessageInfo.Provider());
          //  Last Activity
          pm.addIQProvider("query","jabber:iq:last", new LastActivity.Provider());
          //  User Search
          pm.addIQProvider("query","jabber:iq:search", new UserSearch.Provider());
          //  SharedGroupsInfo
          pm.addIQProvider("sharedgroup","http://www.jivesoftware.org/protocol/sharedgroup", new SharedGroupsInfo.Provider());
          //  JEP-33: Extended Stanza Addressing
          pm.addExtensionProvider("addresses","http://jabber.org/protocol/address", new MultipleAddressesProvider());
  </code></pre>