如何检测,如果该设备具有一个SD卡? [英] How to detect if the device possess an sdcard?
本文介绍了如何检测,如果该设备具有一个SD卡?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我预见我的应用程序将需要一个SD卡存储设备的存在。 我如何查询设备的存储选项清单?
I forsee that my application will require the existence of a sdcard storage device. How do I query the device for a manifest of storage options ?
推荐答案
您可以使用 getExternalStorageState()
。该开发者网站(这里链接)具有推荐的方式很短的片段来检查外接SD卡的presence,以及是否可以写入。
You can use getExternalStorageState()
. The developer site (linked here) has a short snippet of the recommended way to check for the presence of the external SD card, and whether or not you can write to it.
这篇关于如何检测,如果该设备具有一个SD卡?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文