Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Loading and saving using QFile on Android
Forum Updated to NodeBB v4.3 + New Features

Loading and saving using QFile on Android

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 2 Posters 1.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Marco Polo
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kolegs
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Marco Polo
        wrote on last edited by
        #3

        Thanks, I will read it.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved