I'm downloading a file off of my remote server and it works when my WiFi is turned on but not when WiFi is off. It does log into my server but it hangs on the download. No error is thrown..The code is very basic. I wonder if this could be a carrier specific problem. I'm using Verizon if that makes any difference.
B4X:
Sub btnDownload_Click
lbldownloadprogress.Visible = True
lbldownloadprogress.Text = "Attempting to contact server..."
DoEvents
dlftp.Initialize("FTPdownload", "ftp.mydomain.com", 21, "user", "pw")
lbldownloadprogress.Text = "Attempting to download..."
DoEvents
dlftp.DownloadFile("test.txt", False, File.DirRootExternal, "test.txt")
End Sub
Sub FTPdownload_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"
lbldownloadprogress.Text = s
End Sub
Sub FTPdownload_DownloadCompleted (ServerPath As String, Success As Boolean)
lbldownloadprogress.Visible = False
If Success = False Then
Msgbox("Download failed. Contact support.","Download Error")
Else
End If
dlftp.Close
End Sub