android - 如何在 phonegap android 应用程序中更新 Assets 文件(js css 图像)而不更新我在 play/app store 中的应用程序

标签 android cordova

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

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

但有没有办法更新我的 CSS、JS、JS 库、index.html 而无需更新我的应用程序(从商店或我们自己的服务器更新 apk 文件)——这是因为我需要与 native 交互的某些页面,它(CSS/JS,index.html)可能需要更改。

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

我读过这个: cannot modify the files in /android_assets/www with the File API , can't get a file object from an asset

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

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

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

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

最佳答案

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

在这里查看:phonegap-plugin-contentsync

关于android - 如何在 phonegap android 应用程序中更新 Assets 文件(js css 图像)而不更新我在 play/app store 中的应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20715431/

相关文章:

javascript - 移动端的 HTML5 可视化

iphone - 在 iPhone 上使用 Phonegap 条码扫描器

java - com.google.firebase.database.DatabaseException : Expected a Map while deserializing, 但得到了一个类 java.lang.Long

Android - 在查询后保留照片的 ID 并将数据保存到数据库中

java - 应用程序被删除时的消息

javascript - 输入后滚动Phonegap iOS

ios - 如何获取 .mobileprovision 以在 Windows 上构建 phonegap iphone 应用程序?

android - 在中心旋转图像不顺利(Monodroid)

java - 如何避免在 Room Db 的表中重复输入数据?

javascript - 将 admob 广告实现到 Cordova Javascript 应用程序中