Hi,

AndFTP provides intents for third party applications to transfer files/
folders to any FTP, SFTP or FTPS server from sdcard. Here is a sample
for upload:

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:21";);
intent.setDataAndType(ftpUri, "vnd.android.cursor.dir/
lysesoft.andftp.uri");
// FTP credentials (optional)
intent.putExtra("ftp_username", "anonymous");
intent.putExtra("ftp_password", "someth...@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");
// Upload
intent.putExtra("command_type", "upload");
// Activity title
intent.putExtra("progress_title", "Uploading files ...");
intent.putExtra("local_file1", "/sdcard/subfolder1/file1.zip");
intent.putExtra("local_file2", "/sdcard/subfolder2/file2.zip");
// Optional initial remote folder (it must exist before upload)
intent.putExtra("remote_folder", "remotefolder/subfolder");
startActivityForResult(intent, 1);

More samples at:
http://www.lysesoft.com/support/forums/viewtopic.php?f=5&t=157
http://www.lysesoft.com/support/forums/viewtopic.php?f=5&t=158

Hope it helps.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to