title: FTP Client in Java Android Eclipse
body: <p>First of all - This is my first question I ask on StackOverflow. And I'm from Germany, my english is not so good :)</p>
  
  <p>I try to create a FTP Client as a Android App. I'm coding with Eclipse and the Android SDK.</p>
  
  <p>This is my Code, but it doesn't work.
  I use the Apache Commons FTP Library.
  Can you help me? I don't want a functional Code, but I love to get Advice to get the Code working.
  Thanks!</p>
  
  <p>So here is my code:</p>
  
  <hr>
  
  <pre><code>    import org.apache.commons.net.ftp.FTPClient;
  
      public class speechatStart extends Activity {
          /** Called when the activity is first created. */
          @Override
          public void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
              setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
              requestWindowFeature(Window.FEATURE_NO_TITLE);
              setContentView(R.layout.main);
  
  
      Button b1 = (Button) findViewById(R.id.bt_load);
      b1.setOnClickListener(new View.OnClickListener() {
          public void onClick(View v) {
  
  
              FTPClient client = new FTPClient(); 
  
              TextView ausgabe = (TextView) findViewById(R.id.ausgabe);
  
  
              try {
              client.connect("ftp-web.ohost.de");
              client.login("ftp1857836", "123456789"); 
                  String filename = "file1.txt"; 
                  FileInputStream fis = null; 
                      fis = new FileInputStream(filename); 
                      client.storeFile(filename, fis); 
                      client.logout(); 
                      fis.close();
  
                      ausgabe.setText(fis);
  
          } catch (SocketException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
              ausgabe.setText("SocketException");
          } catch (IOException e) {
              // TODO Auto-generated catch block
              ausgabe.setText("IOException");
          } 
  
          }
      });
  </code></pre>
  
  <hr>