LocalGSMLocationProvider icon indicating copy to clipboard operation
LocalGSMLocationProvider copied to clipboard

Please provide means to download updated cell database

Open aelmahmoudy opened this issue 11 years ago • 6 comments

Hello,

I suggest that instead of shipping the cell database with the APK (which renders the program to be huge, please bear in mind that some devices don't have much space in /data), that you would add an activity which allows the user to download the update cell database from OpenCellID, then convert the CSV to a SQLite database that is stored on the sdcard for example (or maybe the app's data dir), that is how mar-v-in implemented the old offline GSM location provider (though user had to manually download the database).

I have a question about the current design though, is the cell database extracted everytime the service is started ? or is it just the first time the user uses the service ?

aelmahmoudy avatar Mar 19 '14 17:03 aelmahmoudy

Regarding bundeling: This is on my TODO (tagged as enhancement). I'm currently using a custom file format (~50% of the sqlite size) and I have not yet ported the generator from scala to java.

The extracted size is checked, which means it won't be reextracted if it successeds :-)

rtreffer avatar Mar 19 '14 17:03 rtreffer

Thanks.

By the way, the backend is now on F-Droid: https://f-droid.org/repository/browse/?fdid=org.gfd.gsmlocation

aelmahmoudy avatar Mar 22 '14 19:03 aelmahmoudy

If there is still no java port, could you publish scala version?

iavael avatar Jun 13 '14 17:06 iavael

https://github.com/rtreffer/compactcellstore

rtreffer avatar Jun 13 '14 18:06 rtreffer

Please keep in mind that the code is very very rough :-S Just add an inline comment if you need an explanation of a code block and I'll try to help

rtreffer avatar Jun 13 '14 18:06 rtreffer

EDIT: I guess what I meant to ask was...

Does a solution exist for Linux and/or windows to convert the full CSV to the proper SQLite format? (tables and all?)

If possible, I'd just as soon download the CSV to my PC once in a while, convert it, then dump it on my phone. The app seems to remotely parse the entire CSV in order to extract the relevant MCC's and that takes a while on the phone, even on a high speed WiFi connection.

Found all the relevant sites, still trying to find the main link/means of downloading the CSV (not something I intend to abuse - just prefer to have "the whole work in my hands" ;-)

I suppose as a feature request, would it be possible to manually specify the CSV in the app settings and then automatically convert to the proper SQLite format? An on-phone solution for this would be cool, unless the relevant tools are already accessible on Windows / Linux.

EDIT2: When I look on my phone under org.fitchfamily.android.gsmlocation/files ... i see:

lacells_gen.log (0.92 MB)
lacells.db.new (552 MB)

When I connect my phone to my PC (windows) and look at the same folder I see:

lacells_gen.log (135 KB)
new_lacells911689997.db (36.1 MB)
new_lacells911689997.db-journal (36 KB)

This is after having done a download of most of the EU countries through the app. If I were to try and convert the CSV myself (assuming I can figure it out), would I just point the settings to an SQLite db file? or is something else going on behind the scenes that creates the new-lacells***.db file(s) files only visible over MTP on the PC?

Thanks for this great resource!!!

TheArkive avatar May 30 '17 18:05 TheArkive