Hey guys! I've been messing with the app "aide" and have written the following code that is crashing the app for some reason:
B4X:
public void startClick(View Button)
{
boolean status = false;
try {
FTPClient mFtpClient = new FTPClient();
mFtpClient.setConnectTimeout(10 * 1000);
mFtpClient.connect(InetAddress.getByName("ftp.drivehq.com:21"));
status = mFtpClient.login("USERNAME", "PASSWORD");
if (FTPReply.isPositiveCompletion(mFtpClient.getReplyCode())) {
mFtpClient.setFileType(FTP.ASCII_FILE_TYPE);
mFtpClient.enterLocalPassiveMode();
Toast huh = Toast.makeText(getApplicationContext(), "testttt", 5000);
huh.show();
mFtpClient.logout();
mFtpClient.disconnect();
}
}
catch(SocketException e)
{
e.printStackTrace();
}
catch(UnknownHostException e)
{
e.printStackTrace();
}
catch(IOException e)
{
e.printStackTrace();
}
}