title: asmack file sending: transfer status = null
body: <p>I am using asmack 18-0.8.9.
  below is my sending file method</p>
  
  <pre><code>public void send()
  {
  
      configureProviderManager(connection);
  
      FileTransferNegotiator.setServiceEnabled(connection, true);
      FileTransferManager manager = new FileTransferManager(connection);
      OutgoingFileTransfer transfer = manager.createOutgoingFileTransfer("xxxxx@jabber.ccc.de/Smack");
  
      File file = new File("/sdcard/DCIM/Camera/1385869353956.jpg");
      try {
          Log.d("file sending",file.getAbsolutePath()+" "+file.getName());
          configureProviderManager(connection);
         transfer.sendFile(file, "test_file");
      } catch (XMPPException e) {
         e.printStackTrace();
      }
  
      while(!transfer.isDone()) {
             if(transfer.getStatus().equals(Status.error)) {
                System.out.println("ERROR!!! " + transfer.getError());
             } else if (transfer.getStatus().equals(Status.cancelled)
                              || transfer.getStatus().equals(Status.refused)) {
                System.out.println("Cancelled!!! " + transfer.getError());
             }
             try {
                Thread.sleep(1000L);
             } catch (InterruptedException e) {
                e.printStackTrace();
             }
          }
  
          if(transfer.getStatus().equals(Status.refused))
                   System.out.println("refused  " + transfer.getError());
          else if( transfer.getStatus().equals(Status.error))
               System.out.println(" error " + transfer.getError());
          else if(transfer.getStatus().equals(Status.cancelled))
             System.out.println(" cancelled  " + transfer.getError());
          else
             System.out.println("Success");
  
  
      }
  </code></pre>
  
  <p>Below is my receiver part</p>
  
  <pre><code>FileTransferManager manager = new FileTransferManager(connection);
          manager.addFileTransferListener(new FileTransferListener() {
             public void fileTransferRequest(final FileTransferRequest request) {
                new Thread(){
                   @Override
                   public void run() {
                      IncomingFileTransfer transfer = request.accept();
                      Log.d("receive","file name: "+transfer.getFileName());
  
  
                      File root = android.os.Environment.getExternalStorageDirectory();
                      File dir = new File (root.getAbsolutePath() + "/download");
                      dir.mkdirs();
                      File file = new File(dir+transfer.getFileName());
                          try {
                              transfer.recieveFile(file);
                          } catch (XMPPException e1) {
                              // TODO Auto-generated catch block
  
                          }
                          while(!transfer.isDone()) {
                             try{
                                Thread.sleep(1000L);
                             }catch (Exception e) {
                                Log.d("receive","thread sleep"+ e.getMessage());
  
                             }
                             if(transfer.getStatus().equals(Status.error)) {
  
                                Log.d("error","error status"+ transfer.getError() + "");
                             }
                             if(transfer.getException() != null) {
  
                                transfer.getException().printStackTrace();
                             }
                          }
  
                   };
                 }.start();
              }
           });
  </code></pre>
  
  <p>I can successfully receive file from other desktop clients like psi, pidgin. When I try to send file from my android app to other desktop client or my own app installed on other phone they do not receive any XMPP message. While when I send file from other desktop client to my android app I can see XMPP message and successfully receive message.</p>
  
  <p>Below is my configureProviderManager method</p>
  
  <pre><code>public void configureProviderManager() {
  
  
      ProviderManager.getInstance().addIQProvider("query","http://jabber.org/protocol/bytestreams", new BytestreamsProvider());
      ProviderManager.getInstance().addIQProvider("query","http://jabber.org/protocol/disco#items", new DiscoverItemsProvider());
      ProviderManager.getInstance().addIQProvider("query","http://jabber.org/protocol/disco#info", new DiscoverInfoProvider());
  
      }
  </code></pre>