【问题标题】:How can I update assets files( js css images) in phonegap android app without update my app in play/app store如何在phonegap android应用程序中更新资产文件(js css图像)而不在play/app store中更新我的应用程序
【发布时间】:2013-12-21 04:31:52
【问题描述】:

我正在使用Phonegap开发我的应用程序,所以我需要将CSS,JS,JS库,index.html打包到assets/www文件夹,并且

super.loadUrl("file:///android_asset/www/index.html",4000);

但是有没有一种方法可以在不更新我的应用程序的情况下更新我的 CSS、JS、JS 库、index.html(无论从商店还是我们自己的服务器更新 apk 文件)--这是因为我需要与本机交互的某些页面(CSS/JS,index.html)可能需要更改。

听起来很蠢,但是有没有办法满足这个要求,iOS 解决方案怎么样

我读过这篇文章: cannot modify the files in /android_assets/www with the File APIcan't get a file object from an asset

但是,我找到了copy files in assets to sdcard

那么,我可以以某种方式更新资产文件吗? 或者这听起来很愚蠢(我不知道 iOS 解决方案):

1 复制到 sdcard
2 更新css/js/index.html 3 super.loadUrl("/mnt/sdcard/myapp/index.html",4000);

还有其他解决方案吗,THX?

【问题讨论】:

    标签: android cordova


    【解决方案1】:

    对于 Cordova/Phonegap,它是一个可用的 contentsync 插件,用于下载远程资源和更新应用程序资产或 Cordova 插件,无需重新发布商店。

    在这里查看:phonegap-plugin-contentsync

    【讨论】:

      猜你喜欢
      • 2020-05-05
      • 2019-12-24
      • 2013-11-22
      • 1970-01-01
      • 1970-01-01
      • 2015-01-28
      • 1970-01-01
      • 1970-01-01
      • 2012-12-24
      相关资源
      最近更新 更多