Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Android calculate cache and data size?

How is the size of cache and data calculated in the application properties?

I save all my data to the SD card, but Android shows me that I'm constantly using 4 KB, but on the SD card are about 50 KB. The same with the cache! I put a 3 MB picture in there. But my cache size is zero!

I think I'm using the correct directory: /mnt/sdcard/Android/data/my.package.name/files and /mnt/sdcard/Android/data/my.package.name/cache.


Has this changed in Android 4.0.x?

See this screenshot:

like image 247
rekire Avatar asked Oct 14 '11 18:10

rekire


1 Answers

I believe the Cache size is the size of the Internal Cache directory that is returned by http://developer.android.com/reference/android/content/Context.html#getCacheDir()

I think you've used: http://developer.android.com/reference/android/content/Context.html#getExternalCacheDir()

like image 184
FunkTheMonk Avatar answered Oct 04 '22 04:10

FunkTheMonk