Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim ftp As FTP
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
ftp.Initialize("FTP","basic4android.de",21,"f00xxxxxxxxxxx","set password from pn here")
ftp.List("/")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub FTP_DownloadCompleted (ServerPath As String, Success As Boolean)
Log($"FTP_DownloadCompleted (${ServerPath}, ${Success})"$)
End Sub
Sub FTP_ListCompleted (ServerPath As String, Success As Boolean, Folders() As FTPEntry, Files() As FTPEntry)
Log($"FTP_ListCompleted(${ServerPath},${Folders.Length},${Files.Length})"$)
If Files.Length>0 Then
For i = 0 To Files.Length-1
Dim fle As FTPEntry = Files(i)
ftp.DownloadFile("/"&fle.Name,False,File.DirRootExternal,fle.Name)
Next
End If
End Sub