Android Question Archiver Lib Error

Pedro Caldeira

Active Member
Licensed User
Longtime User
Hello All,
I am trying to Compress some files But I keep getting a Zip_Done Error and no zip file is getting generated. Can Anyone Help ?
OutPut of the Log(F2S) in the Sub CompressFile(F2S() As String) is:

[Ljava.lang.String;@417fd008

B4X:
Sub btnSync_Click

    Private ListadeFicheiros As List
    ListadeFicheiros=File.ListFiles(txtPastaLocal.Text)
 
    If ListadeFicheiros.Size=0 Then
        Return
    Else
        Private Files2Send(ListadeFicheiros.Size) As String
        For i=0 To ListadeFicheiros.Size-1
            Files2Send(i)=ListadeFicheiros.Get(i)
        Next
    End If
 
    CallSubDelayed(Me,SendCompressedFile)
    CallSubDelayed(Me, CompressFile(Files2Send))
 
End Sub

Sub CompressFile(F2S() As String)
 
    Arc.AsyncZipFiles(txtPastaLocal.Text,F2S,txtPastaLocal.Text, txtNomeFicheiros & ".zip","Compress")
Log(F2S)
 
End Sub

Sub SendCompressedFile
 
    If File.Exists(txtPastaLocal.text,txtNomeFicheiros.Text) Then
        FTP.UpLoadFile(txtPastaLocal.Text,txtPastaSvr.Text,txtNomeFicheiros.text)
    End If
 
End Sub

Sub Compress_ZipDone(CompletedWithOutError As Boolean,NbOffiles As Int)
   
    If CompletedWithOutError = True Then
           ToastMessageShow("Done",True)
    Else
        ToastMessageShow("Error",True)
    End If

End Sub
 

DonManfred

Expert
Licensed User
Longtime User
Maybe the "Private"-declraration Private of your
Files2Send is the problem.

Try to change Private to DIM
 
Upvote 0

Pedro Caldeira

Active Member
Licensed User
Longtime User
Already tried it. Same error :(
I have a Object converted to string Warning, but how to send a string() without an Array
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
txtNomeFicheiros
is a string-variable or a editfield?
If it is not a string then you should use it like
B4X:
Arc.AsyncZipFiles(txtPastaLocal.Text,F2S,txtPastaLocal.Text, txtNomeFicheiros.text & ".zip","Compress")
 
Upvote 0
Top