Intent to download file with FTP settings from AndFTP
Posted: Mon Apr 05, 2010 7:50 pm
You can call AndFTP intent to download file. You can pass an AndFTP alias instead of FTP hostname, login, password ... You need to use alias://aliasdefinedinanftp instead of ftp:// or ftps:// or sftp://
Code: Select all
Intent intent = new Intent();
intent.setAction(Intent.ACTION_PICK);
Uri ftpUri = Uri.parse("alias://myandftpalias");
intent.setDataAndType(ftpUri, "vnd.android.cursor.dir/lysesoft.andftp.uri");
intent.putExtra("command_type", "download");
intent.putExtra("remote_file1", "/remotefolder/subfolder/file1.zip");
intent.putExtra("local_folder", "/sdcard/downloadedfolderalias");
startActivityForResult(intent, 4);