Solved How to package Android application with my map file
-
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? -
@Tony-XU
use Qt's resource system which will include it inside the built binary or place it into the apps assets folder. -
@raven-worx
I used Qt's resource system that works, but I cannot find anything in the apps assets folder. -
@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) -
@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.