I am testing a new 64bit version.
Build: 2019.3498
On Android devices, plugin.zip-> zip.uncompress seems not to work properly.
It will complete without error and will not actually decompress anything.
The program below will display the “Uncompressed” message, but the decompressed image will not be displayed.
The simulator (Mac) succeeds without any problems.
plugins = { ["plugin.zip"] = { publisherId = "com.coronalabs" }, },
----------------------------------------------------------------------------------------- -- -- main.lua -- ----------------------------------------------------------------------------------------- local zip = require( "plugin.zip" ) ----------------------------------------------------------------------------------------- local url = "https://magnum.sublogics.com/dlimages.zip" local zipfilename = "dlimages.zip" ----------------------------------------------------------------------------------------- local tx = display.newText( "Hello", 100, 100, native.systemFont, 36) local function zipListener( event ) if ( event.isError ) then else if ( event.response and type(event.response) == "table" ) then tx.text = "Uncompressed." --- Check uncompressed images. local image1 = display.newImage("dlimages/image1.jpg", system.TemporaryDirectory, 100, 200) local image2 = display.newImage("dlimages/image2.jpg", system.TemporaryDirectory, 100, 300) local image3 = display.newImage("dlimages/image3.jpg", system.TemporaryDirectory, 100, 400) local image4 = display.newImage("dlimages/image4.jpg", system.TemporaryDirectory, 100, 500) local image5 = display.newImage("dlimages/image5.jpg", system.TemporaryDirectory, 100, 600) end end end local function downloadListener( event ) if ( event.isError ) then elseif ( event.phase == "began" ) then elseif ( event.phase == "progress" ) then elseif ( event.phase == "ended" ) then if event.status == 200 then tx.text = "Downloaded." local options = { zipFile = zipfilename, zipBaseDir = system.TemporaryDirectory, dstBaseDir = system.TemporaryDirectory, listener = zipListener, } zip.uncompress( options ) end end end local options = { progress = true, } network.download( url, "GET", downloadListener, options, zipfilename, system.TemporaryDirectory )
I attached a minimal project file.