Important: Please read the Qt Code of Conduct -

Loading and saving using QFile on Android

  • I want to create a game where I could save different scores. I use a QMap, which I insert into the file and read it afterwards (using save() and load() methods, which I wrote). Somewhere in the internet I found that android devices always create a file on the sdcard of the device that belongs to the app with a path like "/sdcard/app_appname". I used this file with the corresponding path to save and load my data and everything worked, but... The problem is that not every android device has an sdcard. So I tried it with the qt resource file system but the path on android seems to be different to the one that works on desktop applications. My question now is what the path is on android.

    Marco Polo

  • I think good idea is to read about QStandardPath class and to be more preciese about this QStandardPaths::AppDataLocation

  • Thanks, I will read it.

Log in to reply