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. How to package Android application with my map file
Forum Updated to NodeBB v4.3 + New Features

How to package Android application with my map file

Scheduled Pinned Locked Moved Solved Mobile and Embedded
5 Posts 2 Posters 1.4k 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.
  • T Offline
    T Offline
    Tony XU
    wrote on last edited by
    #1

    I am trying to draw map with shapefile or MIF file, and the config file will be read when the application is lanuched. But I don't know how to package these map and config files into apk.
    Any suggestions and/or examples?

    raven-worxR 1 Reply Last reply
    0
    • T Tony XU

      I am trying to draw map with shapefile or MIF file, and the config file will be read when the application is lanuched. But I don't know how to package these map and config files into apk.
      Any suggestions and/or examples?

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @Tony-XU
      use Qt's resource system which will include it inside the built binary or place it into the apps assets folder.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      T 1 Reply Last reply
      3
      • raven-worxR raven-worx

        @Tony-XU
        use Qt's resource system which will include it inside the built binary or place it into the apps assets folder.

        T Offline
        T Offline
        Tony XU
        wrote on last edited by
        #3

        @raven-worx
        I used Qt's resource system that works, but I cannot find anything in the apps assets folder.

        raven-worxR 1 Reply Last reply
        0
        • T Tony XU

          @raven-worx
          I used Qt's resource system that works, but I cannot find anything in the apps assets folder.

          raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by
          #4

          @Tony-XU said in How to package Android application with my map file:

          , but I cannot find anything in the apps assets folder.

          Files that are put under assets in the android folder created by Qt Creator, will be packaged as part of your application package

          Did you put it into the assets folder inside your android folder? (The one you specified with the ANDROID_PACKAGE_SOURCE_DIR qmake variable)

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          T 1 Reply Last reply
          0
          • raven-worxR raven-worx

            @Tony-XU said in How to package Android application with my map file:

            , but I cannot find anything in the apps assets folder.

            Files that are put under assets in the android folder created by Qt Creator, will be packaged as part of your application package

            Did you put it into the assets folder inside your android folder? (The one you specified with the ANDROID_PACKAGE_SOURCE_DIR qmake variable)

            T Offline
            T Offline
            Tony XU
            wrote on last edited by Tony XU
            #5

            @raven-worx
            Thanks a lot! I can see my files in the assets folder now, but the paths(":/res/map/airport.shp", "qrc:/res/map/airport.shp" or "assets:/map/airport.shp") are identified by QT only, not by c++. I need my map files inside "files" folder of installation directory. Is there any solution?
            Anyhow I find a solution that I copy map files to the "files" folder with QFile.

            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