I am trying to consume AndFTP intent to upload file through ftp. I've
installed AndFTP in my Android Virtual device and used below code and
ended up with activitynotfoundexception.

Am i missing anything. Do i need to include anything in the xml file.
Please let me know. Any help would be greatly appreciated.


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


Thanks

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

Reply via email to