How do you get the total asset size (or total resource size) in an Android game?

Posted by tom_mai78101 on Game Development See other posts from Game Development or by tom_mai78101
Published on 2012-03-31T06:28:02Z Indexed on 2012/03/31 11:43 UTC
Read the original article Hit count: 265

Filed under:
|
|

In an Android Java project, there are two folders, asset and res. To me, I usually put some stuffs, like PNG files, sound files, etc. in either one of the two folder. When resources are increasingly becoming more and more in those folders, the time it takes to load them will increase. Therefore, a loading screen is a must in these situation.

The total size is to be used in a loading screen, so that I can guess the average time it takes to load each resources, from 0 bytes to its individual resource file size.

I only know that by adding all individual sizes in a respective order, I will then obtain the total asset or res folder size, simply by adding them up.

So, when it comes to getting the total file size from either folder, how do you obtain their individual resource/object sizes, respectively?

Thanks in advance.

© Game Development or respective owner

Related posts about android

Related posts about java