I'm trying to retrieve a file from Ftp Server. For now I am running a
local python server & the android client runs on the same pc.
The Android client does successfully connect to the server & it login
too. But when it comes to downloading a file from the server, I get an
Exception on the emulator saying  "Exception/ip:port - Connection
refused".
I'm using FTPClient Library for the client side.

Here is android client code:
FTPClient client = new FTPClient();
try{
client.connect("10.0.2.2",5000);
client.enterLocalPassiveMode();
boolean login = client.login("User", "1234");
 if (login) {
   File file = new File(getExternalFilesDir(null), "test.txt");
   OutputStream fos = new BufferedOutputStream(new
FileOutputStream(file));
   client.retrieveFile("/testing/test.txt", fos);}
   else client.disconnect();
   }catch (IOException e) {
System.out.println(e.getMessage());
           e.printStackTrace();
       }

I get the exception when it calls "client.retrieveFile("/testing/
test.txt", fos);"

Any Help Plz, Thanks in advance

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to