Modify app assets using Phonegap's File API

后端 未结 2 1835
隐瞒了意图╮
隐瞒了意图╮ 2021-02-15 03:16

I worked on a phonegap application using html5 for a month. I handle offline JSON files using File API.
It seems that the JSON files I st

相关标签:
2条回答
  • 2021-02-15 03:44

    You might consider to utilize Mott: https://github.com/imlucas/mott, e.g. http://phonegap.com/blog/2013/04/23/story-behind-exfm/

    It seems to be able dynamically version, update and persist update of any local asset.

    0 讨论(0)
  • 2021-02-15 03:47

    Sadly, you cannot modify the files in /android_assets/www with the File API.

    See this answer to a slightly different question answered by one of the PhoneGap Android devs: https://stackoverflow.com/a/8966227/878602

    "You can't do what you want to do. The files in the assets directory are not technically on the file system so they are not accessible via the File API. This means calling window. resolveLocalFileSystemURI() will not return you a FileEntry."

    0 讨论(0)
提交回复
热议问题