Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Get AppDataLocation on Android device
CharlieG last edited by CharlieG
In the documentation, QStandardPaths.AppDataLocation should return for Android device : "<APPROOT>/files", "<USER>/<APPNAME>/files".
So in my case, with this code :
I would like to have :
Unfortunatly, I can't get "<APPROOT>/files" (file:///Android/data/net.jiyuusoft.myApp/files). I only get "<USER>/<APPNAME>/files".
My problem is that I don't find "data/user/0/net.jiyuusoft.myApp/files" in my device... so I can't check if my app use the right files (Docs, example, ...).
Do you know how do to have the good path ?
Thank you in advance.
To access "data/user/0/net.jiyuusoft.myApp/files" in a file explorer on Android, you need a rooted device and root explorer. That is because APPROOT is intended to be a "sandbox" for the app - only the application has access there.
CharlieG last edited by
I don't want access "data/user/0/net.jiyuusoft.myApp/files", but I want access "/Android/data/net.jiyuusoft.myApp/files".
With C++, this is possible with :
QString dataLocation = standardPath->standardLocations(QStandardPaths::DataLocation);
But I can't do it with QML, because
only return "data/user/0/net.jiyuusoft.myApp/files".
Have you an idea ?
Hm, I see. I don't have an idea apart from recommending you to use C++ code in this case :-)