Storage limit in raw folder and resource in android

I want to store some video / audio files in the source folder of my application.

I do not know the storage limits for the raw and asset folders.

Can someone tell me how much data I can store in the raw and asset folder.

And also, what if I store mass data in this folder, it will affect the speed of execution or the size of the application to download from the market?

Thanks in advance.

+7
source share
3 answers

Now there are no restrictions on any resources now after the release of Android2.3 new adapter. The restriction is caused by an older adapter for the cause of a system error and should not happen now.

+12
source

According to the reason for assets and resources in Android :

The main differences between the raw folder and the Assets folder.

  • Since raw is a subfolder of Resources (res), Android automatically generates an ID for any file located inside it. it
    ID then saved to the R class , which will act as a link to the file, that is, it can be easily obtained from other Android classes
    and methods and even in Android XML files. Using an automatically generated identifier is the fastest way to access a file in Android.

  • The Assets folder is the application directory. The R class does not generate identifiers for the files located there, so it is less compatible with some Android classes and methods. It is also slower to access the file inside it , since you will need to get access to it based on the string . There is also a 1 MB size limit for files located there , however, some operations are easier done by placing the files in this folder, for example, copying a database file to the system memory. There's no (easy) way to create an Android XML link to files inside the Assets folder.

The limit for any resource that apk will compress is 1 MB , either in the source directory or in assets. This is due to the fact that it is compressed by apk during assembly and uses the hardware resources of the handset phone to unpack it. The limit of 1 MB is imposed so that the phone can unpack it even with a limited resource.

Find out more in HERE using the source folder about its size and much more. Also check the file size limit of Android apps HERE

+9
source

There are a lot of problems ahead when downloading large file sizes. Directly from the resource folder or source folder. Sometimes you can display the vm budget due to an error in android.

To resolve the problem Put your resources on the server. Download them the first time you install your application and save them to your SD card. And get them in your application from your SD card ...

-one
source

All Articles