I am trying to use an upload intent on a Samsung Galaxy Tab with Android 3.2. AndFTP is V 2.9.9.2. The resulting TRANSFERSTATUS is UNKNOWN.
The dialog shown does not look correct, and is attached. The code I am using is from an example and is shown below.
What am I doing wrong?
------------------------------------------------
//You have to define a FTP server URL and upload command:
Intent intent = new Intent();
intent.setAction(Intent.ACTION_PICK);
Uri ftpUri = Uri.parse("ftp://192.168.112.11");
intent.setDataAndType(ftpUri, "vnd.android.cursor.dir/lysesoft.andftp.uri");
intent.putExtra("command_type", "upload");
//You can add FTP credentials:
intent.putExtra("ftp_username", "anonymous");
intent.putExtra("ftp_password", "test");
//intent.putExtra("ftp_keyfile", "/sdcard/rsakey.txt");
//intent.putExtra("ftp_keypass", "optionalkeypassword");;
//Setup optional FTP preferences:
intent.putExtra("ftp_pasv", "true");
//intent.putExtra("ftp_resume", "true");
//intent.putExtra("ftp_encoding", "UTF-8");
//And define file(s) to upload and optional remote folder:
intent.putExtra("local_file1", "/sdcard/results.log");
intent.putExtra("local_file2", "/sdcard/file2.zip");
// Optional initial remote folder (it must exist before upload)
intent.putExtra("remote_folder", "/tmp");
//Finally start the Activity:
startActivityForResult(intent, UPLOAD_FILES_REQUEST);
Upload Intent Broken?Upload Intent Broken?
Re: Upload Intent Broken?Are you sure anonymous/test user is allowed on FTP server? And has write permissions?
|