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. [SOLVED] Packaging Files for Android
QtWS25 Last Chance

[SOLVED] Packaging Files for Android

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

    Hello,

    I have many photographs which are too big to put in QRC, so I need to be able to package up many photographs in the Android package and I then need to be able to load them such as:

    photoPopUP.source = "file:///" + path + "/photos/" + image

    Does anyone know how to do this on Android? I can't simply copy the folder of images into the apk file?

    1 Reply Last reply
    0
    • J Offline
      J Offline
      Jon Heron1
      wrote on last edited by
      #2

      Hello,
      Use assets directory, see here:
      http://doc.qt.io/qt-5/portingtoandroid.html
      "The other approach is to deploy the resources into the package's assets directory. It is the best option if you want to achieve better interoperability with the Android APIs. You can access all resources in the directory using the "assets:" prefix. Unlike qrc, this approach is not a cross-platform solution."
      Cheers,
      Jon

      D 1 Reply Last reply
      0
      • J Jon Heron1

        Hello,
        Use assets directory, see here:
        http://doc.qt.io/qt-5/portingtoandroid.html
        "The other approach is to deploy the resources into the package's assets directory. It is the best option if you want to achieve better interoperability with the Android APIs. You can access all resources in the directory using the "assets:" prefix. Unlike qrc, this approach is not a cross-platform solution."
        Cheers,
        Jon

        D Offline
        D Offline
        drewpotter
        wrote on last edited by
        #3

        @Jon-Heron1 Thanks that worked great!

        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