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. where is "/data/data/<app>" directory?
Forum Updated to NodeBB v4.3 + New Features

where is "/data/data/<app>" directory?

Scheduled Pinned Locked Moved Solved Mobile and Embedded
3 Posts 2 Posters 673 Views
  • 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.
  • canellasC Offline
    canellasC Offline
    canellas
    wrote on last edited by
    #1

    Hi,

    An app I am developing has to create a file. I am using QFileDialog::getSaveFileName() to define the directory, and it suggests "/data/data/org.qtproject.example.my_app/files/". Does anyone know where this directory is really located in the Android file system?

    Thanks!

    1 Reply Last reply
    0
    • QojoteQ Offline
      QojoteQ Offline
      Qojote
      wrote on last edited by
      #2

      Hi,

      This path seems to be more a generic value then a real directory. IMHO (on android) the user shouldnt select the directory to write to. Maybe its better to use:

      QString pathToDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
      

      and append the file name.

      canellasC 1 Reply Last reply
      1
      • QojoteQ Qojote

        Hi,

        This path seems to be more a generic value then a real directory. IMHO (on android) the user shouldnt select the directory to write to. Maybe its better to use:

        QString pathToDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
        

        and append the file name.

        canellasC Offline
        canellasC Offline
        canellas
        wrote on last edited by
        #3

        @Qojote said:

        QString pathToDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);

        Thanks for your answer!

        I did not intend to let the user choose the directory, but as I was having trouble in defining the path, specially because did not know QStandardsPath (!!), I was trying other ways to set it.

        Indeed, the statement you wrote is just what I needed. Thanks a lot!

        Now I can eliminate the cause of "file not found" for why the audio file recorded by the user is not being played back.

        Thanks!

        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