I am using the below method to find the available/free space of my external and internal directory. It returns me 4 GB for internal memory and 3.9 GB for external memory. But when i go to the story section of my phone, it is showing 3.7 GB available space. Why this mismatch.
long freeBytesInternal = new File(ctx.getFilesDir().getAbsoluteFile().toString()).getFreeSpace();
long freeBytesExternal = new File(ctx.getExternalFilesDir(null).toString()).getFreeSpace();