Android Question FTP issue

Discussion in 'Android Questions' started by francesco paolo lavecchia, Jul 17, 2019.

  1. francesco paolo lavecchia

    francesco paolo lavecchia Member Licensed User

    Hi all,

    the code below doesn't work

    (RuntimeException) java.lang.RuntimeException: Object should first be initialized (List).

    What shoud I do?

    Thanks

    Code:
    Dim ftp As FTP

    Sub StartFTP

     
    ftp.Initialize("FTP""server"21"user""password")
     
    ftp.PassiveMode = True
     
    ftp.List("/")

    end suib

    Sub FTP_ListCompleted (ServerPath As String, Success As Boolean, Folders() As FTPEntry, Files() As FTPEntry)
       
        
    Log(ServerPath)
       
        
    If Success = False Then
               
    Log(LastException)
        
    Else
               
    For i = 0 To Folders.Length - 1
                   
    Log(Folders(i).Name)
               
    Next
               
    For i = 0 To Files.Length - 1
                   
    Log(Files(i).Name & ", " & Files(i).Size & ", " & DateTime.Date(Files(i).Timestamp))
               
    Next
        
    End If
       
    End Sub
     
  2. Xicu

    Xicu Member Licensed User

  3. Erel

    Erel Administrator Staff Member Licensed User

    Please post the full error message from the logs.
     
  4. francesco paolo lavecchia

    francesco paolo lavecchia Member Licensed User

    Solved, depended on my mobile phone
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice