I am using Phonegap to develop my app, so I need to package CSS,JS,JS libs, index.html to assets/www folder, and
我正在使用Phonegap开发我的应用程序,所以我需要将CSS,JS,JS库,index.html打包到assets / www文件夹,以及
super.loadUrl("file:///android_asset/www/index.html",4000);
but is there's a way to update my CSS,JS,JS libs, index.html without updating my app(NOT update apk file wherever from store or our own server) -- this is because some page I need to be interactive with native and it(CSS/JS,index.html) may need to be changed .
但有没有办法更新我的CSS,JS,JS库,index.html而不更新我的应用程序(不是从商店或我们自己的服务器更新apk文件) - 这是因为我需要与本机和它(CSS / JS,index.html)可能需要更改。
Sound stupid, but is there a way to satisfy this requirement, and how about iOS solution?
声音很愚蠢,但有没有办法满足这个要求,iOS解决方案怎么样?
I've read from this : cannot modify the files in /android_assets/www with the File API , can't get a file object from an asset
我从中读到:无法使用File API修改/ android_assets / www中的文件,无法从资产中获取文件对象
However , I found copy files in assets to sdcard.
但是,我发现资产中的副本文件为sdcard。
So, can I update the assets files , in some way ? or this sound stupid way(I don't know iOS solution):
那么,我可以用某种方式更新资产文件吗?或者这种愚蠢的方式(我不知道iOS解决方案):
1 copy it to sdcard
2 update the css/js/index.html 3 super.loadUrl("/mnt/sdcard/myapp/index.html",4000);
1将其复制到sdcard 2更新css / js / index.html 3 super.loadUrl(“/ mnt / sdcard / myapp / index.html”,4000);
Is there other solutions, THX ?
还有其他解决方案,THX?
1 个解决方案
#1
0
For Cordova/Phonegap it's available, a contentsync plugin for download remote resource and update application assets or Cordova plugins without store republishing.
对于Cordova / Phonegap,它是可用的,用于下载远程资源和更新应用程序资产的内容同步插件或没有存储重新发布的Cordova插件。
Check here: phonegap-plugin-contentsync
点击此处:phonegap-plugin-contentsync
#1
0
For Cordova/Phonegap it's available, a contentsync plugin for download remote resource and update application assets or Cordova plugins without store republishing.
对于Cordova / Phonegap,它是可用的,用于下载远程资源和更新应用程序资产的内容同步插件或没有存储重新发布的Cordova插件。
Check here: phonegap-plugin-contentsync
点击此处:phonegap-plugin-contentsync