Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("main")
s = ""
old = "ddsmerlk439"
If FirstTime Then
FTP.Initialize("FTP", "host", 21, "user", "password")
End If
FTP.UploadFile(File.DirAssets,"guide.zip",False, "/guide.zip")
End Sub
Sub FTP_UploadProgress (ServerPath As String, TotalUploaded As Long, Total As Long)
s = "Uploaded " & (TotalUploaded / 1024 / 1024) & "MB"
If Total > 0 Then s = s & " out of " & (Total / 1024 / 1024) & "MB"
If s.EqualsIgnoreCase(old) Then
Else
old = s
Label1.Text = s
Log(s)
End If
End Sub
Sub FTP_UploadCompleted (ServerPath As String, Success As Boolean)
Log(ServerPath & ", Success=" & Success)
Label1.Text = "Upload (18mb) completed!"
If Success = False Then Log(LastException.Message)
End Sub