I downloaded FTP FileZilla Server 0.9.41. Had it set up on one of my PCs as a server. The PC is connected to a router via Ethernet. It seems to work. I cannot connect using a Droid device via the below code that is circulating in the forum: The error on the device is: Java.net.connectException Localhost/127.0.0.1:21-connection refused. My Windows XP firewall is turned off. I even temporarily turned my virus protection firewall off. Has anyone encountered such error message and its origin? Thanks
Code:
Code:
B4X:
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
' FTP.Initialize("FTP", "ftp.temasis.com.ar", 21, "ftpsarly", "cacota")
FTP.Initialize("FTP", "127.0.0.1", 21, "namehere", "passwordhere")
End If
Activity.LoadLayout("Main")
End Sub
Sub Button1_Click
' FTP.DownloadFile("Team/prestadores.txt", False, File.DirRootExternal, "PRESTATUTI.txt")
FTP.DownloadFile("Export/AR1_Base.tab" , False, File.DirRootExternal, "My_Base.tab")
End Sub
Sub FTP_DownloadProgress (ServerPath As String, TotalDownloaded As Long, Total As Long)
Dim s As String
s = "Downloaded " & Round(TotalDownloaded / 1000) & "KB"
If Total > 0 Then s = s & " out of " & Round(Total / 1000) & "KB"
Log(s)
End Sub
Sub FTP_DownloadCompleted (ServerPath As String, Success As Boolean)
' Log(ServerPath & ", Success=" & Success)
' If Success = False Then Log(LastException.Message)
Msgbox(ServerPath,"")
If Success = False Then Msgbox(LastException.Message,"")
End Sub