I try send images to FTP server:
The code read all images, but not send to server.
I think the problem is here File.DirRootExternal.
Thanks very much!
B4X:
#Region Project Attributes
#ApplicationLabel: B4A Example
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim ftp1 As FTP
Dim btninvio As Button
Dim btncarica As Button
Dim btncancella As Button
Dim Arquivo As List
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("tutorial")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub btninvio_Click
Arquivo = File.ListFiles("/storage/emulated/0/Android/data/folder/cache/")
For i = 0 To Arquivo.Size - 1
ftp1.Initialize("ftp1","ftp.address.com","21","root","string")
Msgbox(Arquivo.Get(i),"")
ftp1.UploadFile(File.DirRootExternal,Arquivo.Get(i),False,"/storage/emulated/0/Android/data/nesic.app.report/cache/"&Arquivo.Get(i))
'tp1.Close
Next
End Sub
Sub btncarica_Click
End Sub
Sub btncancella_Click
End Sub
Sub ftp1_UploadCompleted (ServerPath As String, Success As Boolean)
If Success = True Then
Msgbox("","")
End If
End Sub
'End Sub
The code read all images, but not send to server.
I think the problem is here File.DirRootExternal.
Thanks very much!