前面一篇文章讲了怎样获取外围卡(即可移除的SD卡)。那么自然就有个问题:怎样获取内置卡?
其实这个很简单,相信各位也很熟悉。也许有人想省事,所以吾就把代码码放这里:
private static String getAppRootOfSdCardInternal() { if (!Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { return null; } return Environment.getExternalStorageDirectory().getAbsolutePath(); }