Android get free size of internal/external memory

前端 未结 13 1011
眼角桃花
眼角桃花 2020-11-22 15:20

I want to get the size of free memory on internal/external storage of my device programmatically. I\'m using this piece of code :

StatFs stat = new StatFs(En         


        
13条回答
  •  情歌与酒
    2020-11-22 15:48

    About external menory ,there is another way:
    File external = Environment.getExternalStorageDirectory(); free:external.getFreeSpace(); total:external.getTotalSpace();

提交回复
热议问题