简体   繁体   English

在Android上更新原始资源而不更新APK

[英]Updating Raw Resources Without Updating APK on Android

I have a set of raw resources that I ship with my APK on Google Play. 我在Google Play上随APK附带了一组原始资源。 Does anyone know if it is possible to update these raw resources without requiring an update to the entire APK? 有谁知道是否可以在不更新整个APK的情况下更新这些原始资源?

I know this sounds like a weird request, but the general idea is that we would like to allow for these raw resources to be "dynamic". 我知道这听起来像是一个奇怪的请求,但是总体思路是我们希望这些原始资源是“动态的”。 The resources are JSON files and these will change quite frequently. 资源是JSON文件,这些文件会经常更改。 We feel that continuously updating the APK in Google Play will not only be burdensome for us, but also for our users :( 我们认为,不断更新Google Play中的APK不仅对我们来说,而且对我们的用户来说都是沉重的负担:

thanks! 谢谢! J Ĵ

Does anyone know if it is possible to update these raw resources without requiring an update to the entire APK? 有谁知道是否可以在不更新整个APK的情况下更新这些原始资源?

It is not possible. 这不可能。

You are welcome to implement your own look-aside cache, though. 不过,欢迎您实现自己的后备缓存。 Your app can poll your servers looking for updates to the JSON files. 您的应用可以轮询您的服务器,以查找JSON文件的更新。 Your app can download the JSON files when they are available. 您的应用可以下载JSON文件(如果可用)。 Your code using the raw resources can check to see if a downloaded copy exists, and if yes, use that, instead of using the ones in resources. 使用原始资源的代码可以检查是否存在下载的副本,如果存在,请使用该副本,而不要使用资源中的副本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM