使用下面的代码,获取安卓内置或外置SD卡根目录:
//内置sd卡路径
String sdcardPath = System.getenv("EXTERNAL_STORAGE");
//内置sd卡路径
String sdcardPath = Environment.getExternalStorageDirectory().getAbsolutePath();
//外置sd卡路径
String extSdcardPath = System.getenv("SECONDARY_STORAGE");
发表回复