Hey guys! I'm not quite sure why my code isn't working here, hopefully someone can help me out!
Here's my code:
It's always returning success = false... I'm 100% sure the ftp details are correct as they're used elsewhere in the app and work properly.
Here's my code:
B4X:
Sub ftp1_DownloadCompleted (ServerPath As String, Success As Boolean)
If Success = True Then
ftp1.Close
lblscroller.Text = File.ReadString(File.DirRootExternal & "/QGAdmin", "screen.txt")
Msgbox("success", "")
Else
Msgbox("FTP Failed", "")
End If
End Sub
Sub lblscroller_Click
ftp1.Initialize("ftp1", hostname.Text, 22, username.Text, password.Text)
ftp1.DownloadFile("/root/screen.txt", True, File.DirRootExternal & "/QGAdmin", "screen.txt")
lblscroller.Text = File.ReadString(File.DirRootExternal & "/QGAdmin", "screen.txt")
End Sub
It's always returning success = false... I'm 100% sure the ftp details are correct as they're used elsewhere in the app and work properly.