适用平台:MTK
适用版本:M
public boolean haveExternelSD(Context context) {
StorageManager mStorageManager = (StorageManager)context.getSystemService(Context.STORAGE_SERVICE);
String[] mPathList = mStorageManager.getVolumePaths();
int size = 0;
for (int i = 0; i < mPathList.length; i++) {
if ("mounted".equals(mStorageManager.getVolumeState(mPathList[i]))) {
size++;
}
}
return size == 1 ? false : true;
}
网友评论