List of usage examples for android.os Environment getDataDirectory
public static File getDataDirectory()
From source file:com.miz.functions.MizLib.java
@SuppressWarnings("deprecation") public static long getFreeMemory() { StatFs stat = new StatFs(Environment.getDataDirectory().getPath()); if (hasJellyBeanMR2()) return stat.getAvailableBlocksLong() * stat.getBlockSizeLong(); else/*from w w w.j av a 2 s . c o m*/ return stat.getAvailableBlocks() * stat.getBlockSize(); }