如何找到留在Android的免费存储(磁盘空间)是多少? [英] How to find the amount of free storage (disk space) left on Android?

查看:125
本文介绍了如何找到留在Android的免费存储(磁盘空间)是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找出在Android手机上运行我的应用程序的可用磁盘空间。有没有一种方法以编程方式做到这一点?

I am trying to figure out the available disk space on the Android phone running my application. Is there a way to do this programmatically?

谢谢

推荐答案

尝试<一href="http://developer.android.com/reference/android/os/StatFs.html#getAvailableBlocks%28%29">StatFs.getAvailableBlocks.你需要的块数转换为KB与getBlockSize。

Try StatFs.getAvailableBlocks. You'll need to convert the block count to KB with getBlockSize.

这篇关于如何找到留在Android的免费存储(磁盘空间)是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆