I added 14 .csv files, uncompressed 102 Mb to the Assets folder and compiled.
.apk size went from 14.2 Mb to 38.7 Mb.
The size of those 14 files, zipped with 7-zip is 11.5 Mb, so it seems 7-zip compresses about twice as much as the .apk zipper.
Still, not sure if it is worth the extra trouble to add a zipped file to the .apk.
Also 38.7 Mb seems OK for the .apk, so I probably go with adding unzipped files.
Happy to be proven wrong here.
RBS
Two problems I encountered with this:
1. Not sure if it is to do with the size of the .apk or the size of the project, but the B4A IDE sometimes goes unresponsive. It recovers OK, but
it is somewhat worrying.
2. Although the .csv are added in the Files tab and do show in the Assets folder I get this error message:
java.lang.RuntimeException: java.io.FileNotFoundException: AssetsDir/postcode_lsoa11cd$1.csv: open failed: ENOENT (No such file or directory)
at anywheresoftware.b4a.keywords.Common$14.run(Common.java:1750)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8751)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
Caused by: java.io.FileNotFoundException: AssetsDir/postcode_lsoa11cd$1.csv: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:575)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:289)
at anywheresoftware.b4a.randomaccessfile.RandomAccessFile.Initialize2(RandomAccessFile.java:103)
at anywheresoftware.b4a.randomaccessfile.RandomAccessFile.Initialize(RandomAccessFile.java:96)
at b4a.exampleljjll.b4xmainpage$ResumableSub_GetCharacterEncodingFromFile.resume(b4xmainpage.java:18949)
at b4a.exampleljjll.b4xmainpage._getcharacterencodingfromfile(b4xmainpage.java:18904)
at b4a.exampleljjll.b4xmainpage$ResumableSub_CSV2SQLiteTable.resume(b4xmainpage.java:13106)
at b4a.exampleljjll.b4xmainpage._csv2sqlitetable(b4xmainpage.java:12818)
at b4a.exampleljjll.b4xmainpage$ResumableSub_PopulateTable.resume(b4xmainpage.java:41600)
at anywheresoftware.b4a.keywords.Common$14.run(Common.java:1748)
... 8 more
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Linux.open(Native Method)
at libcore.io.ForwardingOs.open(ForwardingOs.java:567)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:273)
at libcore.io.ForwardingOs.open(ForwardingOs.java:567)
at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:8611)
at libcore.io.IoBridge.open(IoBridge.java:561)
... 17 more
I do use a custom class to move data from .csv to SQLite and this uses RandomAccessFile.
Could this be the problem?
RBS