Hi,
I am try to upload file from android phone to FTP site using folowing
code where the string to URL is a FTP site with user and password
parameters:
public synchronized boolean connect() {
try {
URL url = new URL("ftp://" + user + ":" +
password + "@" + host
+ "/upload.txt");
//System.out.println("OUTPUT" + url.getPath());
//System.out.println("OUTPUT" + url.getFile());
//System.out.println("ftp://" + user + ":" +
password + "@" + host
//+ "/" + remoteFile + ";type=i");
m_client = url.openConnection();
return true;
} catch (Exception ex) {
Log.e("MAIN MENU", "---------Error-----" +
ex.getMessage());
ex.printStackTrace();
return false;
}
Exception output is: unable to connect to server: {0}
Anyone know why I can not connect to FTP site? Anyone know of a way to
upload a file to FTP from android phone.
Have seen related thread but not solutions?
George
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en