Android Question Archiver library; Goes to sleep

grafsoft

Well-Known Member
Licensed User
Longtime User
Hi,

I try to zip some files. The sub zipend_zipprogression works, it seems to compress all the files, but zipend_zipdone is never called.

What can I do?

Thank you

Peter

B4X:
Sub Process_Globals
   Dim ar As Archiver   
End Sub

Sub Globals
   Dim zipfilename As String
End Sub

Sub Activity_Create(FirstTime As Boolean)
   If FirstTime Then
     zipfilename = Main.outdir & "/" & Main.projectnumber & ".zip"
     File.Delete (Main.outdir,Main.projectnumber & ".zip")
     File.MakeDir (Main.outdir,"zip")
     Dim zipdir As String = File.combine (Main.outdir,"zip")

     ...
     Now I copy about 15 files to zipdir
    ...

     ar.AsyncZipFolder (zipdir,Main.outdir,Main.projectnumber & ".zip","zipend")
End If   

End Sub

Sub zipend_zipprogression (count As Int, Filename As String)
   Log (count & " " & Filename)
End Sub

Sub zipend_zipdone (completedwithouterror As Boolean, nbOfFiles As Int)
   Msgbox (completedwithouterror,nbOfFiles)
   Basis.SendMail ("[email protected]","Zip vom Projekt","Zip",zipfilename)
   
   Activity.Finish
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub
 

grafsoft

Well-Known Member
Licensed User
Longtime User
I see the problem, but no solution:

My code runs a little longer, I need to query a database, copy files and the like, and the program keeps starting activity_create.

Is there a way to say "do this code first, whatever happens"?
 
Upvote 0

grafsoft

Well-Known Member
Licensed User
Longtime User
No.
But as soon as I have a msgbox or archiver.zipfolder, the debugger jumps to Sub Activity_Create.
I have installed the beta 3.80, but the problems occured before.
Should I re-install the older version? In this case: Do you have the link?
 
Upvote 0

grafsoft

Well-Known Member
Licensed User
Longtime User
Yes.

I am having 2 different problems in the same activity. I think I should separate them into 2 activities and see if they influence each other.
 
Upvote 0
Top