Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

能否支持外置SD卡 #136

Open
woaiwojiabinge opened this issue Aug 20, 2021 · 2 comments
Open

能否支持外置SD卡 #136

woaiwojiabinge opened this issue Aug 20, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@woaiwojiabinge
Copy link

目前支持的内部存储卡,如果外置SD卡能否支持呢

@rosuH rosuH added the enhancement New feature or request label Aug 20, 2021
@rosuH
Copy link
Owner

rosuH commented Aug 20, 2021

目前不支持,如果你的需求紧急的话,可以参考修改以下代码:

fun getRootFile():File {
return when (config.mediaStorageType) {
STORAGE_EXTERNAL_STORAGE -> {
File(Environment.getExternalStorageDirectory().absoluteFile.toURI())
}
STORAGE_CUSTOM_ROOT_PATH -> {
if (config.customRootPath.isEmpty()) {
File(Environment.getExternalStorageDirectory().absoluteFile.toURI())
} else {
File(config.customRootPath)
}
}
else -> {
File(Environment.getExternalStorageDirectory().absoluteFile.toURI())
}
}
}

以及这位用户提供的解决方案:#56

我会在近期看下能否加入特性。感谢反馈~

@rosuH rosuH closed this as completed Aug 20, 2021
@rosuH rosuH reopened this Aug 20, 2021
@rosuH
Copy link
Owner

rosuH commented Sep 2, 2021

@woaiwojiabinge 你可以尝试 setCustomRootPath 方法,把外置 SD 卡的路径传进去。这样子应该可以支持单根目录的显示。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants