1
我正在使用org.apache.commons.net.ftp [FTP客戶端類]上傳用戶拍照時創建的一些目錄。但是,我無法展示進度條來展示該操作。Android FTPUpload進度條
我犯了一個新的線程來如下稱呼它:
new Thread(new Runnable() {
public void run() {
String server = "IP";
int port = 21;
String user = "USER";
String pass = "PASSWORD";
FTPClient ftpClient = new FTPClient();
try {
ftpClient.connect(server, port);
ftpClient.login(user, pass);
ftpClient.enterLocalPassiveMode();
String remoteDirPath = "/";
String localDirPath = Environment.getExternalStorageDirectory().getPath() + "/PicturesAPP/";
FTPUtil.uploadDirectory(ftpClient, remoteDirPath, localDirPath, "");
ftpClient.logout();
ftpClient.disconnect();
} catch (IOException ex) {
ex.printStackTrace();
}
}
}).start();
我想一個進度對話框裏面調用它,但它不會出現。
有人可以幫助我嗎?
謝謝你,它的工作! – Tarcisiofl