1925yiyi
 /**
     * 检测是否安装外置SD卡
     *
     * @return
     */
    public boolean checkSDcard() {
        StorageList list = new StorageList(this);
        if (list.getVolumePaths()[0].equals(Environment.MEDIA_MOUNTED)) {
            return true;
        } else {
            return false;
        }
    }

安装了外置SD卡,则返回为true,没有安装SD卡返回值为false。

分类:

技术点:

相关文章:

  • 2021-11-30
  • 2021-12-24
  • 2021-09-04
  • 2021-09-28
  • 2021-05-24
  • 2021-10-02
  • 2021-11-16
  • 2021-07-15
猜你喜欢
  • 2021-10-02
  • 2021-10-02
  • 2021-10-05
  • 2021-11-03
  • 2021-12-05
  • 2021-11-17
  • 2021-05-11
相关资源
相似解决方案