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
Dim BtInvia As Button
Dim BtRicevi As Button
Dim EditText1 As EditText
Dim sdRoot As String
sdRoot = Main.sdRoot (it comes from the main activity module: sdRoot = File.DirRootExternal & "/")
Dim Nfile As String
NFile = "1.zip"
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Sync")
If FirstTime Then
FTP.Initialize("FTP", "192.168.1.91", 21, "emmeci", "emmeci")
End If
End Sub
Sub BtRicevi_Click
Dim myZip As ABZipUnzip
Msgbox("download started","ready!")
File.MakeDir(sdRoot, "mcordini")
File.Delete(sdRoot,NFile)
FTP.List("/")
FTP.DownloadFile(NFile, False, sdRoot, NFile)
myZip.ABUnzip(sdRoot & NFile, sdRoot & "mcordini")
End Sub