android - How to get total internal memory (including system memory) -


this code return total internal memory size:

public static string gettotalinternalmemorysize() {     file path = environment.getdatadirectory();     statfs stat = new statfs(path.getpath());     long blocksize = stat.getblocksize();     long totalblocks = stat.getblockcount();     return formatsize(totalblocks * blocksize); } 

but size without system used memory.

for example, @ galaxy note 3 total internal memory of 32 gb, function returns 26.18 gb.

how determine overall internal memory including missing 5.82 gb of system memory?

the basic idea may work compute first number power of two, , bigger number got returned function.

ex: 2^5 = 32 > 26 

in case number 32. should convert integer before comparing obviously.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -