Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved Path for SD Card.

    Mobile and Embedded
    qml qml binding qml dynamic
    3
    6
    2421
    Loading More Posts
    • 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
      Mathan M last edited by

      Hi All,

      I am developing an app, which i have to access the .mmpk [map package file]. MMPK file will be copied in the SD card root.

      Query 1:
      What will be the path to set it in the QML Code?

      Query 2:
      If the .mmpk file is added in the /Resources [Resources/Resources.qrc/resources [where the AppIcon is present]], So the .mmpk will be bundles and go along with the .apk file.
      Is it the right way? if it so, How to set the path?

      Tried:

      property real scaleFactor: System.displayScaleFactor
      //Input Path
      //property string strMmpkdataPath: System.userHomePath + "/ArcGIS/Runtime/Data/mmpk/" //System path

      //property string strMmpkdataPath: ":/Resources/CARCommune.mmpk" //Mobile SD Card Path

      //property string strMmpkdataPath: "../Resources/CARCommune.mmpk" //Mobile SD Card Path

      property string strMmpkdataPath: "qrc:/Resources/CARCommune.mmpk" ////Mobile SD Card URL

      //System.userHomePath = C:\Users\mmanohar

      //OutPut Path
      property string runtimePath: System.userHomeFolder.filePath("/ArcGIS/Runtime") //mobilePath

      property string dataPath: runtimePath + "/Data"

      property string InputMMPK: "CARCommune.mmpk"

      Thanks in advance

      jsulm 1 Reply Last reply Reply Quote 0
      • jsulm
        jsulm Lifetime Qt Champion @Mathan M last edited by

        @Mathan-M Query 1: it depends on OS and what other devices are attached. On Windows a SDCard usually gets a drive letter assigned to it, but you never know which one. So, you cannot know in advance. Either user has to select the drive or you detect changes.

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        M 1 Reply Last reply Reply Quote 0
        • M
          Mathan M @jsulm last edited by

          Hi @jsulm
          I am using android device.

          Sorry not to mention in previous post.

          Mathan

          jsulm 1 Reply Last reply Reply Quote 0
          • jsulm
            jsulm Lifetime Qt Champion @Mathan M last edited by

            @Mathan-M Are you sure your app will have the access rights to write to the root of the SDCard? On mobile systems an app usually can only write to dedicated locations. I have an Android device but without SDCard, so I cannot check where SDCards are mounted on Android.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            M 1 Reply Last reply Reply Quote 0
            • M
              Mathan M @jsulm last edited by

              Hi @jsulm ,

              I have the permission to write on the SD Card. I suspect the path syntax.I copied the .mmpk file in the SD card\root
              as a input of .mmpk file in the app, I tried bellow path syntax.

              //Input Path
              //property string strMmpkdataPath: ":/Resources/CARCommune.mmpk" //Mobile SD Card Path

              //property string strMmpkdataPath: "../Resources/CARCommune.mmpk" //Mobile SD Card Path

              property string strMmpkdataPath: "qrc:/Resources/CARCommune.mmpk" ////Mobile SD Card URL

              1 Reply Last reply Reply Quote 0
              • L
                ldanzinger last edited by

                Can you do

                property string strMmpkdataPath: "/sdcard/pathToMmpk/CARCommune.mmpk"
                
                1 Reply Last reply Reply Quote 0
                • First post
                  Last post