Based on https://www.b4x.com/android/forum/t...feb-2016-new-library-files-in-post-105.60155/ it seems that there are problems with the library because the available memory after call it decrease a lot and this happens every time the proccess it is called.
Based on the application b4aZXscannerLiveView.zip I develop an activity with a call to a su to obtain the free memory:
Sub GetFreeMemory As String
Dim r As Reflector
r.Target = r.RunStaticMethod("java.lang.Runtime", "getRuntime", Null, Null)
Return ("available Memory = " & ((r.RunMethod("maxMemory") - r.RunMethod("totalMemory"))/(1024*1024)) & " MB")
End Sub
Based on the application b4aZXscannerLiveView.zip I develop an activity with a call to a su to obtain the free memory:
Sub GetFreeMemory As String
Dim r As Reflector
r.Target = r.RunStaticMethod("java.lang.Runtime", "getRuntime", Null, Null)
Return ("available Memory = " & ((r.RunMethod("maxMemory") - r.RunMethod("totalMemory"))/(1024*1024)) & " MB")
End Sub