Qt and Google Play APK expansion files - any experiences?



  • Google have a frustratingly small apk size limit on the Play store: 100MByte (our current workround for our yuuuuuge app is to host it on the Amazon AppStore... but unsurprisingly we're just not getting download numbers from there anywhere near what we're getting on iOS, so we want to get it into the Play store).

    I'm aware Google allow a couple of "expansion files" (more information here) which seem like they could usefully contain all our app's additional data bloat... however, I'm rather intimidated by that page's mention of the need to use some Java/Android-world "Downloader Library" and all the complication involved in hooking it into the application (I know nothing about the application stub Qt use on Android to launch into the native C++/QML engine stuff I'm more interested in; my Android-world experience is limited to editing the manifest xml a bit).

    This leads me to wonder:

    • Is it possible to just ignore all that stuff about the downloader library and just hope/expect the app install does successfully install the expansion file(s) too? (The docs seem a bit vague to me about what circumstances an app might find itself without the expansion). If the expansion files were unexpectedly missing, could simply prodding the user to reinstall the app be an adequate solution?

    • What Google's docs say is:

        In most cases, Google Play downloads and saves your expansion files to the device at the same time it installs or updates the APK. This way, the expansion files are available when your application launches for the first time. However, in some cases your app must download the expansion files itself by requesting them from a URL provided to you in a response from Google Play's Application Licensing service.
      

      but am I just reading too much into that "must"? What exactly are the "some cases"?

    • There's a tantalising post on this topic over on the v-play forum (I'm not a v-play user) here which mentions simply providing a (renamed) qrc as an expansion file and then loading it with QResource::registerResource. However it's not clear to me whether the qrc got there because the app install installed it, or because maybe the v-play people have done more work on their Java "stub" and integrated things like the Downloader Library.

    There's a related issue https://bugreports.qt.io/browse/QTBUG-48591 but it's more about issues with big qrcs on Android.

    Thanks for any tips


  • Lifetime Qt Champion

    Hi,

    Interesting question (sorry I don't have any answer for that). I'd recommend bringing it to the Qt Android development mailing list. You'll find there Qt's Android port developers/maintainers. This forum is more user oriented.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.