Solved Android: Not creating subdir in QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation). Why?
-
Hello!
I have this in my application:QString oPath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/ApplicationName";
and
bool ADir::mEnsure(QString inPath) { QDir oDir(inPath); if (!oDir.exists()) { return oDir.mkpath("."); }; return true; }
This function ensure dir existence on MacOS and iOS everywhere, on Android everywhere but not in QStandardPaths::GenericDataLocation. Why? The same piece of code working perfectly for Android QStandardPaths::GenericConfigLocation. What am I missing?
-
@bogong did you add external write permissions in your manifest and did the runtime permission check before the create attempt?
-
This post is deleted! -
@J-Hilk Thx a lot. I've got it forgotten. I changed manifest file at time of adopting to Qt 5.15.0 and forget to add it to application manifest.