Limit on size of Assets folder

from the CommonsWare Community archives

At May 14, 2020, 3:43pm, Shahood asked:


I just wanted to ask if there is any limit placed on how much data can be placed in the Assets folder of the Android app.

I intend to include a pre-populated database having size of around 30MB. Would that be a problem on any device running any Android version?

My app supports devices on version 21 and above.


At May 14, 2020, 3:58pm, mmurphy replied:

There is nothing unique to assets/. There are limits on the overall APK size, to which assets contribute. Right now, there is a 100MB limit for APKs distributed via the Play Store, and other app distribution channels may have their own limits.

Some users might get irritated due to the amount of space your app takes up. However, I would not expect any technical problems.

At May 14, 2020, 4:05pm, Shahood replied:

So what other options do I have? This is master data which is essential for the app to work.

At May 14, 2020, 4:26pm, mmurphy replied:

Have less data! :grin:

Or, download the database from your server. That eliminates the duplicate copy packed in the asset. BTW, I am assuming that the pre-populated database is SQLite, meaning that you would need to copy it from the asset to a file on the filesystem to be able to use it.

At May 14, 2020, 4:57pm, Shahood replied:

Won’t that be an annoyance of its own kind that right after install, the user is made to wait for all the master data to be downloaded?

Yep, that’s a valid point.

Yep, it is SQLite.

At May 14, 2020, 5:09pm, mmurphy replied:

Yes. Some users value storage space over a one-time bandwidth hit. Others will not. There is no right or wrong answer — I am merely pointing out pain points.