dependencies {
//...
implementation 'com.hd:ftpgg:1.0'
}
FcInfo fcInfo = new FcInfo.Builder()//
.setLoginUserName("ftp")//
.setLoginPassword("ftp")//
.setPort(3535)//
.build();
//start-up client
FTPControl.startClient(fcInfo);
//stop client
FTPControl.stopClient(fcInfo);
FsInfo fsInfo = new FsInfo.Builder()//
.setAccountUserName("ftp")//
.setAccountPassword("ftp")//
.setAllowAnonymous(false)//
.setTakeFullWakeLock(true)//
.setChrootDirPath("")//
.setPortNumber(3535)//
.build();
//start-up socket
FTPControl.startSocket(fsInfo);
//stop socket
FTPControl.stopSocket(fsInfo);