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. Path for SD Card.
QtWS25 Last Chance

Path for SD Card.

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
qmlqml bindingqml dynamic
6 Posts 3 Posters 3.0k 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.
  • M Offline
    M Offline
    Mathan M
    wrote on last edited by
    #1

    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

    jsulmJ 1 Reply Last reply
    0
    • M Mathan M

      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

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @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
      0
      • jsulmJ jsulm

        @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.

        M Offline
        M Offline
        Mathan M
        wrote on last edited by
        #3

        Hi @jsulm
        I am using android device.

        Sorry not to mention in previous post.

        Mathan

        jsulmJ 1 Reply Last reply
        0
        • M Mathan M

          Hi @jsulm
          I am using android device.

          Sorry not to mention in previous post.

          Mathan

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @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
          0
          • jsulmJ jsulm

            @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.

            M Offline
            M Offline
            Mathan M
            wrote on last edited by
            #5

            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
            0
            • L Offline
              L Offline
              ldanzinger
              wrote on last edited by
              #6

              Can you do

              property string strMmpkdataPath: "/sdcard/pathToMmpk/CARCommune.mmpk"
              
              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