Hi,
I am rather new in this android dev. stuff, but have been a VB programmer since I remember.
I first want to congratulate the people responsible for the product, since in a blast !!! Very good to be able to program in Almost VB for the Android platform.
Well, having said that, let me focus on the problem at hand.
The FTP Library (I am using the new NET Library, but seems that it is the some)
When I try to Upload a file I always get an error, but no log info, just a False in the Uploadcomplete event.
The Log window doesn't show any activity other than the activity create, first time=true, etc.
What am I doing wrong ?
Thank in advance
I am rather new in this android dev. stuff, but have been a VB programmer since I remember.
I first want to congratulate the people responsible for the product, since in a blast !!! Very good to be able to program in Almost VB for the Android platform.
Well, having said that, let me focus on the problem at hand.
The FTP Library (I am using the new NET Library, but seems that it is the some)
When I try to Upload a file I always get an error, but no log info, just a False in the Uploadcomplete event.
The Log window doesn't show any activity other than the activity create, first time=true, etc.
What am I doing wrong ?
Thank in advance
B4X:
Sub Activity_Create(FirstTime As Boolean)
activity.loadlayout("main")
readCFG
Lista.Initialize ("Lista")
If FirstTime Then
'FTP.Initialize("FTP", FTPSvr, 21, FTPUser, FTPPass)
FTP.Initialize("FTP", "93.108.251.166", 21, "files", "Files4you")
If FTP.IsInitialized Then
FTPStatus="FTP Inicializado"
End If
End If
End Sub
B4X:
Sub b_testarcfg_Click
If ExternalSD=True Then
File.WriteString (File.DirRootExternal ,"test.ftp","FTP")
l_statuscfg.Text ="Creating File"
FTP.UploadFile (File.DirRootExternal ,"test.ftp",True,"/")
l_statuscfg.Text ="Uploading File"
FTP.DeleteFile ("/test.ftp")
l_statuscfg.Text ="Deleting File"
Else
File.WriteString (File.DirInternal ,"test.ftp","FTP")
l_statuscfg.Text ="Creating File"
FTP.UploadFile (File.DirInternal ,"test.ftp",True,"/")
l_statuscfg.Text ="Uploading File"
FTP.DeleteFile ("/test.ftp")
l_statuscfg.Text ="Deleting File"
End If
End Sub
B4X:
Sub FTP_UploadCompleted (ServerPath As String, Success As Boolean)
If Success = True Then
l_statuscfg.Text="Communication OK"
Else
l_statuscfg.Text="Communication ERROR"
End If
End Sub