Intent to download file with FTP settings from AndFTP

FTP client for Android handsets.

Intent to download file with FTP settings from AndFTP

Postby support » 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);
support
 
Posts: 1021
Joined: Sun Apr 20, 2008 4:40 pm

Re: Intent to download file with FTP settings from AndFTP

Postby tlegras » Tue Apr 06, 2010 9:44 pm

Very good news. I will soon try that :)

Thanks,
Thierry.
tlegras
 
Posts: 5
Joined: Sat Feb 13, 2010 2:32 pm

Re: Intent to download file with FTP settings from AndFTP

Postby zetec » Fri Jun 25, 2010 10:34 pm

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?
zetec
 
Posts: 1
Joined: Fri Jun 25, 2010 10:32 pm

Re: Intent to download file with FTP settings from AndFTP

Postby support » Sat Jun 26, 2010 8:19 am

Are you also passing the correct type ?
intent.setDataAndType(ftpUri, "vnd.android.cursor.dir/lysesoft.andftp.uri");
support
 
Posts: 1021
Joined: Sun Apr 20, 2008 4:40 pm


Return to AndFTP



cron

Sitemap | Privacy Statement | Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc.
in the U.S. and other countries. All other company and/or product names are the property of their respective owners.