title: Android - FTP problem in Android
body: <p>I am trying to do ftp to local host. but im getting error 
  03-03 00:49:40.747: WARN/System.err(4151): java.net.ConnectException: /127.0.0.1:1160 - Connection refused
  03-03 00:49:40.758: WARN/System.err(4151):     at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:255)</p>
  
  <p>And the code follows like this</p>
  
  <pre><code>             FTPClient ftp;
  
              server = "10.0.2.2";
  
              username = "newuser";
  
              password = "wampp";
  
              remote = "/sample.txt";
  
              local = "/data/data/com.test.sample/files/sample/sample.txt";
  
                  ftp = new FTPClient();
  
  
                  InputStream input;
  
                  input = new FileInputStream(local);
  
                  ftp.storeFile(remote, input);
  
                  input.close();
  </code></pre>
  
  <p>I am using XAMPP server as my localhost. It Contains FileZilla. Same code works fine as normal java application.</p>