B4A Library ProBundle

ProBundle contains all the following libraries:

- ArchiverPlusZip v1.13
Based on the Zip4j library, this library allows to add, extract, update and remove files from a zip archive.
It supports encryption and decryption (standard and AES), Zip64 format and split zip archives. It is compatible with B4J.

- ClassLoader v1.0
This library can dynamically load classes from a separate file (JAR or uninstalled APK) at runtime and verify the file signatures to make sure of its origin and integrity.
You can use the library to create plug-ins, load code encrypted in the assets or download code from a remote server, for example.

- CPUFeatures + source v1.0
This library detects the target device's CPU family and the maximum number of CPU cores.

- DataCollection v1.07
This library wraps the ArrayDeque, BitSet, PriorityQueue, SparseArray, Stack, TreeMap and TreeSet classes. These classes can replace your lists, maps or arrays for specific tasks. A TreeSet, for example, can maintain a sorted list of objects in a more efficient manner than a typical List class. A TreeMap is a map whose entries are sorted by their keys. A SparseArray is also a sorted map, but restricted to integer keys, that is lightning-fast.
This library can serialize to an array of bytes any collection, including Map, List and user defined types. A version for B4J is provided (without the SparseArray).

- F5Steg v1.2
This library implements F5, a secure steganographic algorithm, which embeds data into images. Data are encrypted with a password or, by default, with the application signature (thus any tampering of the APK will prevent from extracting valid data).

- FastIO + source v0.9
This library replaces the Read and Write functions (with their encrypted variant) of the RandomAccessFile library for arrays of bytes. These new functions are a lot faster.

- OverlayWindow + source v1.2
This library allows to create overlay windows and floating buttons. These interactive views can be displayed on top of all other applications.

- PackageUtils v2.1
This library replaces the PackageManager class of the Phone library. It gives plenty of informations on packages (activities, features, permissions, receivers, services, etc.) and can list the features available on the system (camera, gps, wifi, etc.). It allows experts to change the enabled state of components.
An application is provided with the library to show what you can get with it.

- UltimateArchiver v0.91
This library wraps P7Zip, a command line utility that can create archives with the 7z, zip, bzip2, gzip, tar or xz format. It can unpack files with extension 7z, cab, gz, img, iso, jar, rar, tar, zip and a few others.
It supports encryption/decryption and volumes. It is written in C to be as fast as possible.

- UnArchiver7z v1.0
Based on the official source code in C of 7zip, this library allows to extract files from a 7z archive compressed with the Lzma or Lzma2 method. It can unpack an archive directly from the assets.
It does not support decryption.

- UnArchiverRar v1.04
Based on the official source code in C++ of the UnRar.dll, this library allows to extract files from a Rar archive.
It supports decryption, Rar5 format, QuickOpen records and split Rar archives.

Since September 2018, ProBundle is available for free. You can still donate for it if you wish.
To send the money, just click on the Donate button below (the amount to enter is in euros):


CURRENT VERSION : ProBundle 1.22

DOWNLOAD HERE:
 
Last edited:

zhousongke

Member
Licensed User
Longtime User
Look at OverlayWindow.

I modified the code of the OverlayWindow class to raise events such as onTouch, onPointerDown, onPointerUp, onDown, onSingleTapUp, onSingleTapConfirmed, onDoubleTap, onShowPress, onLongPress, onDrag, onScroll, onFling, onPinchOpen, onPinchClose, onRotation
, etc. The ScreenX/Y parameter is added to the onTouch and onDrag events. The library, source code, and samples in the attachment.
 

Attachments

  • OverlayWindowGesture and SourceCode.zip
    33 KB · Views: 183

mr.gedo

Member
I modified the code of the OverlayWindow class to raise events such as onTouch, onPointerDown, onPointerUp, onDown, onSingleTapUp, onSingleTapConfirmed, onDoubleTap, onShowPress, onLongPress, onDrag, onScroll, onFling, onPinchOpen, onPinchClose, onRotation
, etc. The ScreenX/Y parameter is added to the onTouch and onDrag events. The library, source code, and samples in the attachment.

hello,
how to pin the widget to right or left automatically when i moving it like facebook messenger ?

like this

 

Informatix

Expert
Licensed User
Longtime User
hello,
how to pin the widget to right or left automatically when i moving it like facebook messenger ?

like this

You must first detect the user's intention (his gesture to the right or to the left) and then correctly position the button on the right side.
 

mr.gedo

Member
You must first detect the user's intention (his gesture to the right or to the left) and then correctly position the button on the right side.

Hello informatix, thank you for reply

I don't understand how exactly to do this ?
How i can detect the user gesture and make effect like magnetic ?
 

aidymp

Well-Known Member
Licensed User
Longtime User
@Informatix Hi, someone asked about the coverflow lib, i directed him here but its been removed!

Any reason why?

Thanks

PS it still a great library!! ;) and i would pay for updates!
 

Informatix

Expert
Licensed User
Longtime User
@Informatix Hi, someone asked about the coverflow lib, i directed him here but its been removed!

Any reason why?

Thanks

PS it still a great library!! ;) and i would pay for updates!
The Coverflow library is still there.
 

SMOOTSARA

Active Member
Licensed User
Longtime User
hi Informatix
i have this error in ArchiverPlusZip


B4X:
relayoutVisibleWindow: Window{e9b7eee u0 b4a.example/b4a.example.main EXITING} mAnimatingExit=true, mRemoveOnExit=false, mDestroying=false
duplicate layer name: changing b4a.example/b4a.example.main to b4a.example/b4a.example.main#1
tid 8455: eglSurfaceAttrib(1354): error 0x3009 (EGL_BAD_MATCH)
Failed to set EGL_SWAP_BEHAVIOR on surface 0xe9f856c0, error=EGL_BAD_MATCH
Attempting to set client state on removed layer: b4a.example/b4a.example.main#1
Attempting to destroy on removed layer: b4a.example/b4a.example.main#1
duplicate layer name: changing Dim Layer for - Task=3935 to Dim Layer for - Task=3935#1
Attempting to set client state on removed layer: Dim Layer for - Task=3935#0
Attempting to destroy on removed layer: Dim Layer for - Task=3935#0
Launch timeout has expired, giving up wake lock!
Class anywheresoftware.b4a.B4AThreadPool failed lock verification and will run slower.
Class a.a.a.d.f failed lock verification and will run slower.
Unexpected event (missing RaiseSynchronousEvents): archiver_zipprogression
Check the unfiltered logs for the full stack trace.
java.lang.Exception: Stack trace
    at java.lang.Thread.dumpStack(Thread.java:1348)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:314)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
    at anywheresoftware.b4a.ShellBA$1.run(ShellBA.java:77)
    at android.os.Handler.handleCallback(Handler.java:873)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at anywheresoftware.b4a.Msgbox.waitForMessage(Msgbox.java:248)
    at anywheresoftware.b4a.Msgbox.waitForMessage(Msgbox.java:217)
    at anywheresoftware.b4a.keywords.Common.DoEvents(Common.java:412)
    at b4a.flm.archiverplus.ArchiverPlusZip.a(SourceFile:208)
    at b4a.flm.archiverplus.ArchiverPlusZip.UnZip(SourceFile:321)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:777)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:354)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:193)
    at b4a.example.main.afterFirstLayout(main.java:111)
    at b4a.example.main.access$000(main.java:17)
    at b4a.example.main$WaitForLayout.run(main.java:83)
    at android.os.Handler.handleCallback(Handler.java:873)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6680)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Attempting to set client state on removed layer: Dim Layer for - Task=3935#1
hw_composer sent 72 syncs in 92s
Remote logger timeout: 1
Starting remote logger. Port: 35352
UnZip test.zip * OK
Skipped 159 frames!  The application may be doing too much work on its main thread.
Davey! duration=2662ms; Flags=0, IntendedVsync=7973650490383, Vsync=7976300490277, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=7976304207052, AnimationStart=7976304297566, PerformTraversalsStart=7976305153820, DrawStart=7976305373401, SyncQueued=7976305478722, SyncStart=7976305599687, IssueDrawCommandsStart=7976305658353, SwapBuffers=7976305958950, FrameCompleted=7976312656170, DequeueBufferDuration=151000, QueueBufferDuration=254000,
Skipped 122 frames!  The application may be doing too much work on its main thread.
Davey! duration=2059ms; Flags=0, IntendedVsync=7976317159305, Vsync=7978350492557, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=7978365216481, AnimationStart=7978365235199, PerformTraversalsStart=7978365241624, DrawStart=7978365426005, SyncQueued=7978365496126, SyncStart=7978365519872, IssueDrawCommandsStart=7978365566246, SwapBuffers=7978366249573, FrameCompleted=7978376801194, DequeueBufferDuration=163000, QueueBufferDuration=1060000,
Skipped 41 frames!  The application may be doing too much work on its main thread.
Davey! duration=700ms; Flags=0, IntendedVsync=7978380720229, Vsync=7979064053535, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=7979074588203, AnimationStart=7979074607200, PerformTraversalsStart=7979074613905, DrawStart=7979074657765, SyncQueued=7979074734870, SyncStart=7979074976241, IssueDrawCommandsStart=7979075029041, SwapBuffers=7979075268178, FrameCompleted=7979081123112, DequeueBufferDuration=99000, QueueBufferDuration=434000,
hw_composer sent 30 syncs in 60s
Scan result ready event
Remote logger timeout: 2
Starting remote logger. Port: 35352
hw_composer sent 6 syncs in 60s


1592469706479.png
 

Informatix

Expert
Licensed User
Longtime User
hi Informatix
i have this error in ArchiverPlusZip


B4X:
relayoutVisibleWindow: Window{e9b7eee u0 b4a.example/b4a.example.main EXITING} mAnimatingExit=true, mRemoveOnExit=false, mDestroying=false
duplicate layer name: changing b4a.example/b4a.example.main to b4a.example/b4a.example.main#1
tid 8455: eglSurfaceAttrib(1354): error 0x3009 (EGL_BAD_MATCH)
Failed to set EGL_SWAP_BEHAVIOR on surface 0xe9f856c0, error=EGL_BAD_MATCH
Attempting to set client state on removed layer: b4a.example/b4a.example.main#1
Attempting to destroy on removed layer: b4a.example/b4a.example.main#1
duplicate layer name: changing Dim Layer for - Task=3935 to Dim Layer for - Task=3935#1
Attempting to set client state on removed layer: Dim Layer for - Task=3935#0
Attempting to destroy on removed layer: Dim Layer for - Task=3935#0
Launch timeout has expired, giving up wake lock!
Class anywheresoftware.b4a.B4AThreadPool failed lock verification and will run slower.
Class a.a.a.d.f failed lock verification and will run slower.
Unexpected event (missing RaiseSynchronousEvents): archiver_zipprogression
Check the unfiltered logs for the full stack trace.
java.lang.Exception: Stack trace
    at java.lang.Thread.dumpStack(Thread.java:1348)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:314)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
    at anywheresoftware.b4a.ShellBA$1.run(ShellBA.java:77)
    at android.os.Handler.handleCallback(Handler.java:873)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at anywheresoftware.b4a.Msgbox.waitForMessage(Msgbox.java:248)
    at anywheresoftware.b4a.Msgbox.waitForMessage(Msgbox.java:217)
    at anywheresoftware.b4a.keywords.Common.DoEvents(Common.java:412)
    at b4a.flm.archiverplus.ArchiverPlusZip.a(SourceFile:208)
    at b4a.flm.archiverplus.ArchiverPlusZip.UnZip(SourceFile:321)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:777)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:354)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:193)
    at b4a.example.main.afterFirstLayout(main.java:111)
    at b4a.example.main.access$000(main.java:17)
    at b4a.example.main$WaitForLayout.run(main.java:83)
    at android.os.Handler.handleCallback(Handler.java:873)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6680)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Attempting to set client state on removed layer: Dim Layer for - Task=3935#1
hw_composer sent 72 syncs in 92s
Remote logger timeout: 1
Starting remote logger. Port: 35352
UnZip test.zip * OK
Skipped 159 frames!  The application may be doing too much work on its main thread.
Davey! duration=2662ms; Flags=0, IntendedVsync=7973650490383, Vsync=7976300490277, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=7976304207052, AnimationStart=7976304297566, PerformTraversalsStart=7976305153820, DrawStart=7976305373401, SyncQueued=7976305478722, SyncStart=7976305599687, IssueDrawCommandsStart=7976305658353, SwapBuffers=7976305958950, FrameCompleted=7976312656170, DequeueBufferDuration=151000, QueueBufferDuration=254000,
Skipped 122 frames!  The application may be doing too much work on its main thread.
Davey! duration=2059ms; Flags=0, IntendedVsync=7976317159305, Vsync=7978350492557, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=7978365216481, AnimationStart=7978365235199, PerformTraversalsStart=7978365241624, DrawStart=7978365426005, SyncQueued=7978365496126, SyncStart=7978365519872, IssueDrawCommandsStart=7978365566246, SwapBuffers=7978366249573, FrameCompleted=7978376801194, DequeueBufferDuration=163000, QueueBufferDuration=1060000,
Skipped 41 frames!  The application may be doing too much work on its main thread.
Davey! duration=700ms; Flags=0, IntendedVsync=7978380720229, Vsync=7979064053535, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=7979074588203, AnimationStart=7979074607200, PerformTraversalsStart=7979074613905, DrawStart=7979074657765, SyncQueued=7979074734870, SyncStart=7979074976241, IssueDrawCommandsStart=7979075029041, SwapBuffers=7979075268178, FrameCompleted=7979081123112, DequeueBufferDuration=99000, QueueBufferDuration=434000,
hw_composer sent 30 syncs in 60s
Scan result ready event
Remote logger timeout: 2
Starting remote logger. Port: 35352
hw_composer sent 6 syncs in 60s


View attachment 95832
In debug mode ? You shouldn't use it with async tasks.
 

JagiChan

Member
The download link in post #1 is not working. The error states "The page isn’t redirecting properly An error occurred during a connection to doc-08-94-docs.googleusercontent.com."
 

Informatix

Expert
Licensed User
Longtime User
The download link in post #1 is not working. The error states "The page isn’t redirecting properly An error occurred during a connection to doc-08-94-docs.googleusercontent.com."
???
I just successfully downloaded the file.
A problem with your browser ?
 

Midimaster

Active Member
Licensed User
hi, im using your ArchiverPlusZip very successfull on Android. Now I want to use it on B4J and I got this error:

B4J 8.5 on windows 10, compiled as "Release"
player._entzippen (java line: 84)
java.lang.NoSuchMethodError: anywheresoftware.b4a.keywords.Common.DoEvents()V
at b4a.flm.archiverplus.ArchiverPlusZip.a(SourceFile:208)
at b4a.flm.archiverplus.ArchiverPlusZip.UnZipFile2(SourceFile:356)
at b4j.example.player._entzippen(player.java:84)
at b4j.example.player._loadsong(player.java:106)
at b4j.example.main._menu_action(main.java:279)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:91)
at anywheresoftware.b4a.BA$1.run(BA.java:216)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
at java.base/java.lang.Thread.run(Thread.java:834)

working 1 5.012793064117432

the last black line was from my event sub:
B4X:
Sub ZipEvent_ZipProgression(Operation As Int,Filename As String, Percent As Float )
    If Percent>5 Then
        Log("working " & Operation & " " & Percent)
    End If
End Sub

The unzip file was created, but not full finished.

Looks like a bug, or?
 

Midimaster

Active Member
Licensed User
yes, but i'm searching for a common solution for both platforms , and perhaps the author want to keep it running on both platforms. It looks like he used the keyword "DoEvents". will see, what he answers...
 

Informatix

Expert
Licensed User
Longtime User
hi, im using your ArchiverPlusZip very successfull on Android. Now I want to use it on B4J and I got this error:

B4J 8.5 on windows 10, compiled as "Release"


the last black line was from my event sub:
B4X:
Sub ZipEvent_ZipProgression(Operation As Int,Filename As String, Percent As Float )
    If Percent>5 Then
        Log("working " & Operation & " " & Percent)
    End If
End Sub

The unzip file was created, but not full finished.

Looks like a bug, or?
Could you post your project ? ArchiverPlusZip works with B4J and an example for B4J is provided with the library.
 

Midimaster

Active Member
Licensed User
good to hear, that ArchiverPlusZip will work on B4J.
first of all we should find out, whether I use the current version. I'm not sure, that I use the current version, because when I visit your homepage (with Firefox) , I cant start any download. So I received the library from anywhere. My download had the filename "Archiver v1.11.zip" and a size of 27.029bytes. Inside the zip there is a folder "library". 7zip says it's size will be 51.589bytes. Inside is are only two files: a Archiver.jar from 2013-06-13 and a Archiver.xml from 2013-06-13

My code is nothing special:
B4X:
Sub Process_Globals
    Public Zip As ArchiverPlusZip
    Public DataFolder, UserFolder, SourceFolder As String
    Public ZipPasswort As String="123456" ' fake passwort for forum!!
...

Sub AppStart (Form1 As Form, Args() As String)
    DataFolder=File.DirData("20Tracks")
...

Sub DeZip(FileName As String, TargetName As String ) As String
    Zip.DecryptZipWithString(ZipPasswort)
    Dim ZipFileName As String = File.Combine( DataFolder, FileName)
    Dim lstEntries As List = Zip.ListZipEntries(ZipFileName)
    Dim ZipInfo As ArchiverZipInfo = lstEntries.Get(0)
    Dim SourceFileName=ZipInfo.FileName
    Zip.UnZipFile2(ZipFileName,SourceFileName,DataFolder,TargetName,"")
    File.Delete(DataFolder,FileName)
...

Sub ZipEvent_ZipResult(Result As Int,Error As String )
    Log("ready" & Result & " " & Error)
End Sub


Sub ZipEvent_ZipProgression(Operation As Int,Filename As String, Percent As Float )
    If Percent>5 Then
        Log("working " & Operation & " " & Percent)
    End If
End Sub

The ZIP-file is made in a B4A-app with ArchiverPlusZip on an Android device. It contains only one file of 10MB (packed) crypted with AES-128. For security reasons I cannot send you the original ZIP, but I will try to build a fake copy of the file if necessary.

But perhaps you can first check, whether I work with the correct version?
 

Informatix

Expert
Licensed User
Longtime User
good to hear, that ArchiverPlusZip will work on B4J.
first of all we should find out, whether I use the current version. I'm not sure, that I use the current version, because when I visit your homepage (with Firefox) , I cant start any download. So I received the library from anywhere. My download had the filename "Archiver v1.11.zip" and a size of 27.029bytes. Inside the zip there is a folder "library". 7zip says it's size will be 51.589bytes. Inside is are only two files: a Archiver.jar from 2013-06-13 and a Archiver.xml from 2013-06-13

My code is nothing special:
B4X:
Sub Process_Globals
    Public Zip As ArchiverPlusZip
    Public DataFolder, UserFolder, SourceFolder As String
    Public ZipPasswort As String="123456" ' fake passwort for forum!!
...

Sub AppStart (Form1 As Form, Args() As String)
    DataFolder=File.DirData("20Tracks")
...

Sub DeZip(FileName As String, TargetName As String ) As String
    Zip.DecryptZipWithString(ZipPasswort)
    Dim ZipFileName As String = File.Combine( DataFolder, FileName)
    Dim lstEntries As List = Zip.ListZipEntries(ZipFileName)
    Dim ZipInfo As ArchiverZipInfo = lstEntries.Get(0)
    Dim SourceFileName=ZipInfo.FileName
    Zip.UnZipFile2(ZipFileName,SourceFileName,DataFolder,TargetName,"")
    File.Delete(DataFolder,FileName)
...

Sub ZipEvent_ZipResult(Result As Int,Error As String )
    Log("ready" & Result & " " & Error)
End Sub


Sub ZipEvent_ZipProgression(Operation As Int,Filename As String, Percent As Float )
    If Percent>5 Then
        Log("working " & Operation & " " & Percent)
    End If
End Sub

The ZIP-file is made in a B4A-app with ArchiverPlusZip on an Android device. It contains only one file of 10MB (packed) crypted with AES-128. For security reasons I cannot send you the original ZIP, but I will try to build a fake copy of the file if necessary.

But perhaps you can first check, whether I work with the correct version?
Please udpate your version to 1.13. It can be downloaded from the first post of this thread. Change for another browser if Firefox does not work.
 
Top