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.

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 9 Aug 2016, 09:54 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

    J 1 Reply Last reply 9 Aug 2016, 10:29
    0
    • M Mathan M
      9 Aug 2016, 09:54

      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

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 9 Aug 2016, 10:29 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 9 Aug 2016, 10:41
      0
      • J jsulm
        9 Aug 2016, 10:29

        @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 9 Aug 2016, 10:41 last edited by
        #3

        Hi @jsulm
        I am using android device.

        Sorry not to mention in previous post.

        Mathan

        J 1 Reply Last reply 9 Aug 2016, 10:43
        0
        • M Mathan M
          9 Aug 2016, 10:41

          Hi @jsulm
          I am using android device.

          Sorry not to mention in previous post.

          Mathan

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 9 Aug 2016, 10:43 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 9 Aug 2016, 11:18
          0
          • J jsulm
            9 Aug 2016, 10:43

            @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 9 Aug 2016, 11:18 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 15 Aug 2016, 21:48 last edited by
              #6

              Can you do

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

              1/6

              9 Aug 2016, 09:54

              • Login

              • Login or register to search.
              1 out of 6
              • First post
                1/6
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved