Sample Header Ad - 728x90

Shared storage accessible from C code

0 votes
0 answers
37 views
I have a stalled project that I would like to give a new try. It is about to read large amount of map data from sqlite using C code. I do not understand what options I have after the scooped storage constraints in Android. I need a very performant access to the sqlite db, and I need to read it from C code. It is working on Android 10 by just reading from a map I call TilelessMap on the phone. So, my question is if there are any good ways to get access to an sqlite database that is not constrained and deleted with a special app. The solution must also work on unrooted phone. I will also give a short description about the project. It is open source and more or less what I have lives here: https://gitlab.com/nicklasaven/tilelessmap It is about rendering data from a special map data format I have called twkb (tiny well known binary). The idea is to read all data directly fom the database for each pan/zoom avoiding any caching complexity. It works very well. A have 1:50000 maps (most detailed free maps) of Sweden and Norway in my phone. It is a few GB. But that is the reason I do not want to store it in app specific area of the phone. A reinstall of the app should not mean you need to get all the map data again. I also plan to put all sync work of the database in a separate app. Then the map app is totally offline, which I think is a feature. What makes this solution fast in rendering is 2 things. 1) coordinates to be rendered is decoded from twkb directly into C arrays and pushed to the GPU. No objects or complex structures on the way 2) The triangulation information for polygons is baked into the format. So there is an array with indexes ready for use that defines for the gpu how to render the triangles. So there is no client processing in run time to create the triangles. Sorry for the long text, but I would really appreciate any hints about if shared storage used like this is possible nowadays in Android. Trying to read the docs is quite confusing for a non Android developer.
Asked by Nicklas Avén (101 rep)
Dec 28, 2023, 10:24 AM