Page 1 of 1

Intent to download file with FTP settings from AndFTP

Posted: Mon Apr 05, 2010 7:50 pm
by support
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);

Re: Intent to download file with FTP settings from AndFTP

Posted: Tue Apr 06, 2010 9:44 pm
by tlegras
Very good news. I will soon try that :)

Thanks,
Thierry.

Re: Intent to download file with FTP settings from AndFTP

Posted: Fri Jun 25, 2010 10:34 pm
by zetec
I can't get this to work. I'm trying to get it to work with Transdroid and my FTPS-only ftp.

I'm entering the following uri into Transdroid:

alias://MyAliasName

and in AndFTP, I have a server saved with the name

MyAliasName

and then all my settings.

Am i missing something?

Re: Intent to download file with FTP settings from AndFTP

Posted: Sat Jun 26, 2010 8:19 am
by support
Are you also passing the correct type ?
intent.setDataAndType(ftpUri, "vnd.android.cursor.dir/lysesoft.andftp.uri");