开发者

Bundle APK with dynamic application properties file?

开发者 https://www.devze.com 2023-02-28 12:11 出处:网络
Is it possible to bundl开发者_如何学JAVAe or generate an APK with some sort of dynamic file where you can set different application properties, such as background colors, etc?

Is it possible to bundl开发者_如何学JAVAe or generate an APK with some sort of dynamic file where you can set different application properties, such as background colors, etc?

Thanks!


This is a high level answer, but assuming they are downloading the apk file from a webserver, there's nothing stopping you from generating some sort of configuration file, dropping it in res and accessing it from your application. An apk file is simply a "zip" file with some extra trimmings. It would not be difficult to have your classes.dex file along with the other requisite files on the server, and create an apk file on the file using some sort of zip library. Now, I'm not familiar off the top of my head how you could access an arbitrary file (such as an xml file or .properties file) out of the res folder, but a little bit of googleing should give you that answer.

0

精彩评论

暂无评论...
验证码 换一张
取 消