Intent to download a full folder (including subfolder)

FTP client for Android handsets.
Post Reply
support
Posts: 853
Joined: Sun Apr 20, 2008 4:40 pm

Intent to download a full folder (including subfolder)

Post by support »

You can call andFTP intent to download a full folder from FTP/SFTP/FTPS server:

Code: Select all

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", "something@somewhere.com");
//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 folder ...");
// Remote folder to download (must not ends with /).
intent.putExtra("remote_file1", "/remotefolder/uploadedfolder");
intent.putExtra("local_folder", "/sdcard/downloadedfolder");			
startActivityForResult(intent, 3);
It will display the transfer activity:
Download folder
Download folder
intent_download_folder.png (20.9 KiB) Viewed 5839 times

Post Reply