Page 1 of 1

Activitynotfound exception

Posted: Tue Jun 08, 2010 6:16 am
by raviteja
I am getting ActivitynotfoundException while uploading files.

I've installed AndFTP in my AVD and trying to use the code that has been given in the forum.

Intent intnt = new Intent();
intnt.setAction(Intent.ACTION_PICK);
Uri ftpUri = Uri.parse("ftp://127.0.0.1");
intnt.putExtra("ftp_username", "demo");
intnt.putExtra("ftp_password", "demo");
//intent.putExtra("ftp_keyfile", "/sdcard/dsakey.txt");
//intent.putExtra("ftp_keypass", "optionalkeypassword");
// FTP settings (optional)
intnt.putExtra("ftp_pasv", "true");
//intent.putExtra("ftp_resume", "true");
//intent.putExtra("ftp_encoding", "UTF8");
// Download
intnt.putExtra("command_type", "upload");
// Activity title
intnt.putExtra("progress_title", "Uploading files ...");
// Close activity after transfer (optional)
// intent.putExtra("close_ui", "true");
// Remote files to download.
intnt.putExtra("/sdcard/1.3gp", "ravi.3gp");
//intnt.putExtra("remote_file2", "/remotefolder/subfolder/file2.zip");
// Target local folder where files will be downloaded.
//intnt.putExtra("remote_folder", "/sdcard/localfolder");
startActivityForResult(intnt, 0);


Am i missing anything. Do i need to include anything in the manifest.xml. Please help.

Re: Activitynotfound exception

Posted: Fri Jun 11, 2010 7:45 pm
by support
No, nothing in Manifest. You do need:

Code: Select all

intent.setDataAndType(ftpUri, "vnd.android.cursor.dir/lysesoft.andftp.uri");