Deploy a large database using the Android application

I need to write an application for Android devices that need to access a large (~ 200 MB) database. What would be the best way to do this? Can I just paste the database into the resource folder? I read about the various restrictions that apply to the entire size of the application and to individual resources inside, especially on some devices ... What exactly are these limitations?

Is there a way to do this separately from the download after installing from an external server?

+4
source share
1 answer

The G1 has 256 MB of internal memory for applications. Even the Nexus One has only 512 MB, so I think it is unlikely that anyone would want one application to occupy such a large share of this storage, so creating a 200 MB + .apk file will not be practical.

Perhaps your options are:

  • Make the database accessible through a web service so that your application can query it through an Internet connection.
  • Download bit data as needed and cache it on an SD card.
  • Download the database to the SD card the first time you launch your application.

I think the last of these is the least preferred since downloading 200 MB will take a lot of time and can use a significant portion of someone's monthly monthly allowance for users. If you intend to do this, it may be worth checking the status of the phone so that you only boot if you have a Wi-Fi connection .

+11
source

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


All Articles