What is the differnce between accessing file from assets folder or SD card

北战南征 提交于 2019-12-03 08:06:36

Files over 1mb placed in the assets folder won't be readable from your app (It'll throw an exception).

This is because they get compressed during the build process, and thus the phone requires substantial resources to uncompress them when on the handset.

If the asset is compressed, the system has to uncompress the entire thing to memory. If you have a 20MB asset, that means 20MB of physical memory is tied up by your application.

I believe you can place them in the raw folder, where they won't get compressed.

EDIT :

You can upload upto 50MB file sized APK to android market, that is standard and it is now giving support to bigger sized APK's too. See below reference link for this:

Android Apps Break the 50MB Barrier

Thanks.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!