Add support for changing save location on Android (#1520)

- Enabled the Android UI path for changing the data folder
- Added Android MANAGE_EXTERNAL_STORAGE permission
- Added an Android flow to request “All files access” before opening the folder picker
- Added code path to resume the folder selection flow after returning from Android settings
- Improved the Android write-probe error message to point users at the required permission
This commit is contained in:
Carlos Manuel
2026-05-23 19:43:02 -06:00
committed by GitHub
parent beb4146f33
commit 533c76f4d6
4 changed files with 90 additions and 1 deletions
+7
View File
@@ -525,7 +525,14 @@ bool validate_writable_data_path(const std::filesystem::path& path, std::string*
try {
io::FileStream::WriteAllText(probePath, "dusk");
} catch (const std::exception& e) {
#if defined(__ANDROID__)
set_error(errorOut,
fmt::format("{} could not write to the selected folder. On Android, allow "
"\"All files access\" for Dusklight and try again.",
AppName));
#else
set_error(errorOut, fmt::format("{} could not write to the selected folder.", AppName));
#endif
Log.warn("Failed write probe for custom data folder '{}': {}", io::fs_path_to_string(path),
e.what());
return false;