Hello, I try to zip 3 files in 1 zip. I use a classe ZipManager and I have this error:
And this is my code:
This is the class.
Thanks
B4X:
zipmanager_zip (java line: 73)
java.lang.RuntimeException: Method: zipFiles not found in: rpcycling.appdev.zipmanager
at anywheresoftware.b4j.object.JavaObject$MethodCache.getMethod(JavaObject.java:366)
at anywheresoftware.b4j.object.JavaObject.RunMethod(JavaObject.java:119)
at rpcycling.appdev.zipmanager._zip(zipmanager.java:73)
at rpcycling.appdev.page_activite._save_fatigue_click(page_activite.java:1278)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:170)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:166)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
at android.view.View.performClick(View.java:6256)
at android.view.View$PerformClick.run(View.java:24697)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
And this is my code:
B4X:
Dim zm As ZipManager
zm.Initialize
zm.Zip(Array As String (File.Combine(shared, json_name), _
File.Combine(shared, chunck_name), _
File.Combine(shared, gps_name)), _
File.Combine(shared, "myimages.zip"))
B4X:
Sub Class_Globals
Private jo As JavaObject
End Sub
'Initializes the ZipManager
Public Sub Initialize
jo = Me
End Sub
Public Sub Zip (Source() As String, Destination As String)
jo.RunMethod("zipFiles", Array(Source,Destination))
End Sub
Public Sub UnZip (Source As String, Destination As String) As Boolean
Return jo.RunMethod("unzipFiles", Array(Source,Destination))
End Sub
Thanks