The best way to deploy the application that comes with a lot of data

I am working on an Android application that will ship with a lot of data. I would suggest that I just distribute the SQLite database, but I can understand that the database can be included, but must be copied from raw data, which, if there will be a lot of MB of data, unnecessary space. For my application, all the data is text / numeric / date, and in a relational database usually four tables occupy. So cute, but with two copies it seems wasteful.

The options I see are:

  • Rotate duplicate data (it hurts me)
  • During installation, the application downloads the data via HTTP (then I will have a potential problem with downloading), possibly in Google App Engine.

Any other solutions worth considering?

+3
source share
3 answers

I faced the same situation: I am writing an application that should access - locally - a database containing mostly text and weighing more than 20 MB (compression of 7 MB is compressed).

The best solution, in my opinion, for this problem is to load the archived compiled database when you first run the application. Benefits of this solution:

  • The APK remains bright. This is good because:
    • very large APKs can discourage some potential users
    • testing is faster, since downloading 7 MB + APKs to AVD (as I did initially) is rather slow.


  • ( ZIP-


  • . , SD-. res/raw , Android < 2.2, SD CARD (- , , ).

: CSV XML . , , .

+2

res/raw, , unfortunatley , , .. .

- csv xml res/raw, , , . csv xml, .

-, , res/raw 1 , , , , :

Database Population Solution

Android-, , , , :

, - SD- . Downloader , , .apk .

Downloader Blogspot

, - DB .

+2

, 1: , apk - zip, , , .

+1

Source: https://habr.com/ru/post/1771206/


All Articles