How to add android expansion files using Qt

帅比萌擦擦* 提交于 2019-12-06 05:41:17

问题


I am currently developing an Android app using Qt / QML and my app will be a lot larger than the 50 MB Google Play Store limit due to media files that are to be bundled, so I have to use extension files. After some searching I found on a page a line saying that Qt resource system can help make .obb extension files:

"For large resources that do not fit into the Google Play store 50 MB limit, qrc can generate rcc files that can be put in obb"

but I can not find any information on how to do this or how to access those files from my code.

EDIT: I have made an .rcc file using Qt. Trying to convert it to .obb now. Anyone done this using the jobb tool?

I was also thinking that I could just upload the .rcc file directly as Google Play accepts any file format for expansion files, but then I would not be able to get it encrypted.. but how could I access the .rcc file? Do I have to write some Java code or could I get it to work from Qt C++/QML?

EDIT: I figured it out. I created an external binary resource file using the rcc tool available in Qt command prompt. Using QResource class I can load the external binary resource file and access it as it was a normal qrc resource file.


回答1:


I was facing a similar issue with expansion files and solved it. Although I did not cover any encryption issues.

Please consult the following answer: https://stackoverflow.com/a/31911151/3155461



来源:https://stackoverflow.com/questions/30965549/how-to-add-android-expansion-files-using-qt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!