开发者

Get Internal Available Storage in Device

开发者 https://www.devze.com 2023-02-02 06:55 出处:网络
I need to know how much internal space is left on device, but \"internal\" space no external SD c开发者_如何学Card.

I need to know how much internal space is left on device, but "internal" space no external SD c开发者_如何学Card.

This code is used for external SD space.

how-to-check-available-space-on-android-device-on-mini-sd-card

anyone know how to get the free internal space?

Thanks in advance.


The code you linked to is what you need. However, rather than:

StatFs stat = new StatFs(Environment.getExternalStorageDirectory().getPath());

use something like:

StatFs stat = new StatFs(getFilesDir().getPath());
0

精彩评论

暂无评论...
验证码 换一张
取 消