views:

381

answers:

1

I didn't post this but I have the same question as the person who did.

I have a file stored on an ftp the URL to it is like this: "ftp://something.etc.etc"

It seems that the android browser is unable to handle such links. You receive an error when trying to download the file from my link. Is there a way to download files from an ftp url via the android browser that I am somehow missing? I can download the file in in my PC browser with no issues.

A: 

Try to install AndFTP. Then use the provided Intent to download file: http://www.lysesoft.com/support/forums/viewtopic.php?f=5&t=157

Intent intent = new Intent();
intent.setAction(Intent.ACTION_PICK);
// FTP URL (Starts with ftp://, sftp:// or ftps:// followed by hostname and port).
Uri ftpUri = Uri.parse("ftp://yourftpserver.com");
intent.setDataAndType(ftpUri, "vnd.android.cursor.dir/lysesoft.andftp.uri");
// FTP credentials (optional)
intent.putExtra("ftp_username", "anonymous");
intent.putExtra("ftp_password", "[email protected]");
//intent.putExtra("ftp_keyfile", "/sdcard/dsakey.txt");
//intent.putExtra("ftp_keypass", "optionalkeypassword");
// FTP settings (optional)
intent.putExtra("ftp_pasv", "true");
//intent.putExtra("ftp_resume", "true");
//intent.putExtra("ftp_encoding", "UTF8");
// Download
intent.putExtra("command_type", "download");
// Activity title
intent.putExtra("progress_title", "Downloading files ...");
// Remote files to download.
intent.putExtra("remote_file1", "/remotefolder/subfolder/file1.zip");
intent.putExtra("remote_file2", "/remotefolder/subfolder/file2.zip");
// Target local folder where files will be downloaded.
intent.putExtra("local_folder", "/sdcard/localfolder");         
startActivityForResult(intent, 0);
lysesoft