title: Android How to connect to FTP?
body: <p>i am trying to connect to a server through a apache FTP:</p>
  
  <pre><code>public boolean ftpConnect(String host, String user, String pass){
          try {
              ftpClient = new FTPClient();
              ftpClient.connect(host);
              if(FTPReply.isPositiveCompletion(ftpClient.getReplyCode())){
                  boolean status = ftpClient.login(user, pass);
                  ftpClient.enterLocalPassiveMode();
                  return status;
              }
          } catch (SocketException e) {
              Log.d("FTP", "Error: could not connect to socket " + host );
          } catch (IOException e) {
              Log.d("FTP", "Error: could not connect to host " + host );
          }
          return false;
  }
  </code></pre>
  
  <p>If i am connected to internet through WI-FI, the above code is working, but if i am connected through 3G is not working. I've already added the permission for Internet on the
  manifest. I haven't found an explanation for this on google.</p>