How to store files in the shared file directory of Android?
a.burks last edited by a.burks
I use the the QStandardPath approach to identify the directory and the FileIO approach to store files. Further more I have added
android.permission.WRITE_EXTERNAL_STORAGEto the Manifest file.
QStandardPaths::DocumentLocationdoesn't work. The directory couldn't be created. The
QStandardPaths::AppDataLocationworks. A directory like
data/user/0/com.mycompany.myapp/filesis created. The write process returns true and I can find a directory
/storage/self/primary/Android/data/com.mycompany.myapp/filesbut not the stored file itself. Surprisingly I can read the file with after writing it. But it doesn't appear in the file system.
Previously I tried to store a file without the
QStandardPathstuff by defining the path my self with
just myfile.txt. The second alternative returned a true for the writing process, but I couldn't find the file anywhere.
has someone an idea?