I am trying to begin a download using the AndFTP Intent API. The file can't be found. I am using this as a reference: http://www.lysesoft.com/products/andftp/ (bottom of page)
I have tried a couple of combinations of Host and remoteFile1 but am bad at path syntax. I get either [filename] not found, or cannot change directory.
Also when I try to view this location using an FTP client all the folders are invisible.
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Intent intent = new Intent();
intent.setAction(Intent.ACTION_PICK);
Uri ftpUri = Uri.parse("ftp://173.192.225.183/2/PSX-PAL/");
intent.setDataAndType(ftpUri, "vnd.android.cursor.dir/lysesoft.andftp.uri");
intent.putExtra("ftp_username", "anonymous");
intent.putExtra("ftp_password", "[email protected]");
intent.putExtra("ftp_pasv", "true");
intent.putExtra("ftp_wget", "true");
// Download
intent.putExtra("command_type", "download");
// Activity title
intent.putExtra("progress_title", "Downloading files ...");
// Remote files to download.
intent.putExtra("remote_file1", "Metal Gear Solid (Demo) (E) [SLED-01400].7z");
// Target local folder where files will be downloaded.
intent.putExtra("local_folder", "/sdcard/localfolder");
startActivityForResult(intent, 0);
}
}