Intent to download file with FTP settings from AndFTP

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

Intent to download file with FTP settings from AndFTP

Post 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);

tlegras
Posts: 5
Joined: Sat Feb 13, 2010 2:32 pm
AntiSpam sum: 8

Re: Intent to download file with FTP settings from AndFTP

Post by tlegras »

Very good news. I will soon try that :)

Thanks,
Thierry.

zetec
Posts: 1
Joined: Fri Jun 25, 2010 10:32 pm
AntiSpam sum: 8

Re: Intent to download file with FTP settings from AndFTP

Post 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?

support
Posts: 853
Joined: Sun Apr 20, 2008 4:40 pm

Re: Intent to download file with FTP settings from AndFTP

Post by support »

Are you also passing the correct type ?
intent.setDataAndType(ftpUri, "vnd.android.cursor.dir/lysesoft.andftp.uri");

Post Reply