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. Android: Find suitable folder for the app data and debugging
Forum Updated to NodeBB v4.3 + New Features

Android: Find suitable folder for the app data and debugging

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 2 Posters 740 Views 2 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.
  • Andy314A Offline
    Andy314A Offline
    Andy314
    wrote on last edited by
    #1

    Hello I am a beginner with Android.

    I need a folder with the following feature.

    1. accessable from outside (SMTB) -Windows Explorer - debugging - see log files etc.
    2. Data should be persistent over the app deinstallation
    3. Full access (read/write/create folder etc.) incl. access to a sqlite database for the app.

    After hours of hours dicussion with chat-gpt and a lot of tests I found no working solution.

    In the moment, I am in the
    /storage/emulated/0/Download/AppName
    path.

    I can put data via Android-Studio in the path. The app can write f.e. my log-file but not access a sqlite database. After some tests I found via QFileInfo, that the DBfile is not readable
    If have set the permission READ_EXTERNAL_STORAGE but this changes nothing.

    What must I do ? How it get the permission ?
    Has Android a better folder for this task ?

    Pl45m4P 1 Reply Last reply
    0
    • Andy314A Andy314

      Hello I am a beginner with Android.

      I need a folder with the following feature.

      1. accessable from outside (SMTB) -Windows Explorer - debugging - see log files etc.
      2. Data should be persistent over the app deinstallation
      3. Full access (read/write/create folder etc.) incl. access to a sqlite database for the app.

      After hours of hours dicussion with chat-gpt and a lot of tests I found no working solution.

      In the moment, I am in the
      /storage/emulated/0/Download/AppName
      path.

      I can put data via Android-Studio in the path. The app can write f.e. my log-file but not access a sqlite database. After some tests I found via QFileInfo, that the DBfile is not readable
      If have set the permission READ_EXTERNAL_STORAGE but this changes nothing.

      What must I do ? How it get the permission ?
      Has Android a better folder for this task ?

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by
      #2

      @Andy314 said in Android: Find suitable folder for the app data and debugging:

      After hours of hours dicussion with chat-gpt and a lot of tests I found no working solution.

      I wonder why :D

      /storage/emulated/0/Download/AppName

      Why the Download folder?
      storage/emulated is the internal flash memory of your phone (emulated "android" filesystem"). But I don't think "Download" is a suitable place there...

      READ_EXTERNAL_STORAGE

      I would say because the Download folder is not in external storage?!


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      1 Reply Last reply
      0
      • Andy314A Offline
        Andy314A Offline
        Andy314
        wrote on last edited by
        #3

        I figuered out:
        The folder is not the problem, the App has full access to it. The problem are rights for the file(s).
        If I copy a file via Android Studio, the app has no rights to read it.
        Then I have packted the database-file in a resource of the exe and installed it during the app start in a folder. All works fine then.
        But every reinstallation of the app removes all rights for the file.
        I must activate "deinstall old application befor deployment", because without it I cannot switch between release and debug version.
        Whats the common best practise for this problem ?

        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