Wish: Option to reduce APK size

Kevin

Well-Known Member
Licensed User
Longtime User
I don't even know if this is possible, or what the theoretical "maximum" amount of KB savings would be, but if I understand how things work correctly.....

I'll use the core library as an example but I'm sure this could apply to all libraries referenced in a project:

While converting the B4A code to java, would it be possible to keep track of all functions used in the project and then create a temporary copy of the core (and others) library and remove the code for unused functions from the library?

Again, perhaps the savings would not be worth it, but I figured this could possibly reduce an APK's size by 100 to several hundred KB or more. Maybe just nitpicking but when it comes to APKs (and EXEs for that matter), I've always felt that smallest is better.
 

Roger Garstang

Well-Known Member
Licensed User
Longtime User
It would probably be easier to just optimize our code if not done already. Any unused sub (or unused private sub in v2) in our code not getting compiled, etc. B4A already segments the libraries and we select what we need. The only thing I see that could be segmented out of Core are Math/Trig Functions. Those would probably be the biggest too. Then you can select them if needed. Everything else in there you need or provides GUI stuff every app most likely needs/uses to be anything of value.
 
Top