Android Question zip Folder with their Contents

invocker

Active Member
I use a lib ABZipUnzip


dir is = "/mnt/shared/Pictures/Imagens"

folder is Imagens that contain a 17 images


B4X:
myZip.ABZipDirectory("/mnt/shared/Pictures/Imagens"  & "start", "/mnt/shared/Pictures" & "/" & "myzip.zip")

I get error

and file myzip.zip size is 0
i Use this lib hier and the same


mybe a dir problem
 

invocker

Active Member
I resolve it by using ArchiverPlusZip

B4X:
Dim Arc As ArchiverPlusZip

    Arc.ZipCompression = True

    Arc.ZipExecutionMode = Arc.ZIP_EXECMODE_ASYNCHRONOUS

    Dim InputFolder As String =dir & "/" & name 

    Arc.AddFolderToZip(InputFolder, File.Combine(dir & "/",name & ".zip"), "ZIP")

    Wait For ZIP_ZipResult(Result As Int, ErrorMsg As String)

    Dim bf() As Byte = File.ReadBytes(dir,name &".zip")
 
Upvote 0
Top