Early in my app I have to unzip a file required for Text to Speech. In Windows the zipped file consists of a parent folder and four sub-folders. There is a total of 13 files and one sub folder in these folders. The Zip file is just under 40 MB (too big to attach here).
My test code looks like this:
The results in the log look like this:
I cannot figure out why the other files are not being unzipped. This code is run in a B4XPage. There is a non-async version which reports the same three unzipped files.
I have a version of the app when this code was run in an activity and all the files were unzipped.
Any ideas?
My test code looks like this:
B4X:
Sub Setup_VC
LogColor($"Setting up VC"$, Modcolour)
arc.AsyncUnZip(File.DirInternal, cmTMM.gsmodel_zip_name,File.DirInternal,"DooDah")
End Sub
Sub DooDah_UnZipProgression(Count As Int, FileName As String)
LogColor($"Files unzipped: ${Count} Latest File: ${FileName}"$, Modcolour)
End Sub
Sub DooDah_UnZipDone(CompletionSuccess As Boolean, FileCount As Int) As ResumableSub
LogColor($"${FileCount} files unzipped. Completion success is ${CompletionSuccess}"$, Modcolour)
Return CompletionSuccess
End Sub
B4X:
Setting up VC
Files unzipped: 1 Latest File: /data/user/0/b4a.TMMX/files/model/am/final.mdl
Files unzipped: 2 Latest File: /data/user/0/b4a.TMMX/files/model/graph/disambig_tid.int
Files unzipped: 3 Latest File: /data/user/0/b4a.TMMX/files/model/graph/HCLr.fst
-1 files unzipped. Completion success is false
** Activity (tmm_start) Pause event (activity is not paused). **
*** b4xptmm_runid: B4XPage_Disappear [mainpage, b4xptmm_runid]
I have a version of the app when this code was run in an activity and all the files were unzipped.
Any ideas?