Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private class FtpTask extends AsyncTask<Void, Void, FTPClient> {
- protected FTPClient doInBackground(Void... args) {
- serverconnection ftpconnect =new serverconnection();
- FTPClient ftp=ftpconnect.connectftp();
- return ftp;
- }
- protected void onPostExecute(FTPClient result) {
- Log.v("FTPTask","FTP connection complete");
- ftpClient = result;
- //Where ftpClient is a instance variable in the main activity
- }
- }
- //makenya
- new FtpTask().execute();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement