Android - how to handle saving file on low device memory(Internal/External memory) -
how can handle file saving on low device memory(internal/excternal memrory). know if sufficient space not available os throw ioexception there way handle gracefully.
file path = environment.getdatadirectory(); statfs stat = new statfs(path.getpath()); long blocksize = stat.getblocksize(); long availableblocks = stat.getavailableblocks(); return formatter.formatfilesize(this, availableblocks * blocksize);
Comments
Post a Comment