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. Wrong storage path on Android
Forum Updated to NodeBB v4.3 + New Features

Wrong storage path on Android

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

    After upgrading to Qt 5.13.1 (from Qt 5.11) I found out that QStandardPaths::writableLocation(QStandardPaths::HomeLocation) returns wrong path. In fact I think that my whole app is installed to a wrong directory.

    The package name of my app is cz.jech.muzika, but the function above returns path /data/user/0/com.example.sabrim.sbrtest/files/. I have no idea where the package name com.example.sabrim.sbrtest comes from. I found it some Qt examples. Maybe it is somewhere incorrectly hard-coded.

    My phone is not rooted so I cannot check the paths and what is stored there. I have a lot of other problems which I do believe are all related to this issue. Should I file a bug report for it? Can somebody confirm this problem? Thank you.

    M 1 Reply Last reply
    0
    • V vlada

      After upgrading to Qt 5.13.1 (from Qt 5.11) I found out that QStandardPaths::writableLocation(QStandardPaths::HomeLocation) returns wrong path. In fact I think that my whole app is installed to a wrong directory.

      The package name of my app is cz.jech.muzika, but the function above returns path /data/user/0/com.example.sabrim.sbrtest/files/. I have no idea where the package name com.example.sabrim.sbrtest comes from. I found it some Qt examples. Maybe it is somewhere incorrectly hard-coded.

      My phone is not rooted so I cannot check the paths and what is stored there. I have a lot of other problems which I do believe are all related to this issue. Should I file a bug report for it? Can somebody confirm this problem? Thank you.

      M Offline
      M Offline
      mvuori
      wrote on last edited by
      #2

      You can use File Explorer Root Browser to see what's in that folder - it seems to work without rooting at least in my Huawei

      1 Reply Last reply
      0
      • V Offline
        V Offline
        vlada
        wrote on last edited by
        #3

        Thank you, I found the problem. It was on my side. Strange that searching for the string in my whole project didn't find it, but the wrong path came a from a modification I did in build.gradle file.

        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