を見つけた私は、FTPクライアントhttp://www.lysesoft.com/products/andftp/index.html何の活動も例外
のため、このサイトからサンプルコードをダウンロードしているしかし、私はこの例外を持って、クラッシュしたプロジェクトを実行したとき。
03-27 21:40:44.572: INFO/System.out(559): EEE : No Activity found to handle Intent { act=android.intent.action.PICK dat=ftp://192.168.20.128 typ=vnd.android.cursor.dir/lysesoft.andftp.uri (has extras) }
この理由は何ですか? 誰でも私にFTP用の完全に動作するアンドロイドコードを提供できますか?
これはダウンロード用のコードです。
Intent intent = new Intent();
intent.setAction(Intent.ACTION_PICK);
// FTP URL (Starts with ftp://, sftp://, ftps:// or scp:// followed by hostname and port).
Uri ftpUri = Uri.parse("ftp://192.168.20.128");
intent.setDataAndType(ftpUri, "vnd.android.cursor.dir/lysesoft.andftp.uri");
// Download
intent.putExtra("command_type", "download");
// FTP credentials (optional)
intent.putExtra("ftp_username", "anonymous");
intent.putExtra("ftp_password", "[email protected]");
//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", "UTF-8");
//intent.putExtra("ftps_mode", "implicit");
// Activity title
intent.putExtra("progress_title", "Downloading files ...");
// Remote files to download.
intent.putExtra("remote_file1", "/remotefolder/subfolder/file1.zip");
intent.putExtra("remote_file2", "/remotefolder/subfolder/file2.zip");
// Target local folder where files will be downloaded.
intent.putExtra("local_folder", "/sdcard/localfolder");
intent.putExtra("close_ui", "true");
startActivityForResult(intent, DOWNLOAD_FILES_REQUEST);
私はあなたが活動がアンドロイドマニフェストに記載されていることを「startActivityForResult」
AndFTPアプリをインストールしましたか? – Cristian
いいえ、その必要性は何ですか – user1293519