gpt4 book ai didi

android - 移动网络应用程序在本地化时使用什么代替 LocalStorage?

转载 作者:行者123 更新时间:2023-11-29 13:19:08 25 4
gpt4 key购买 nike

就像标题一样。这似乎是一个简单的问题,但我对原生开发不是很熟悉,所以我想得到解释。

我的问题是:

Web apps (including mobile web app, which has mobile-friendly UI&UX, which can use popular frameworks such as Sencha Touch, jQuery Mobile, etc.) have the ability to "go offline" with LocalStorage. This can be simply understood as a "persistent database" of the browser. So when they go native (I mean packaging them into a native app), does the LocalStorage still exist and work? If yes, are they still LocalStorage or will they be "transformed" into another native kind of storage with equal functionalities?

感谢您的帮助!

最佳答案

他们(根据我自己的经验,Android 和阅读的 iOS)没有使用任何东西 - 他们使用相同的本地存储!

这是通过告诉运行该页面的 native WebView/webkit 将所有本地存储映射到设备持久存储上的某个路径来完成的。实现起来非常简单。请注意,使用 Android 持久数据将需要您向用户询问将数据写入磁盘的权限。

从 HTML 开发人员的角度来看,没有什么特别需要做的。

关于android - 移动网络应用程序在本地化时使用什么代替 LocalStorage?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14826517/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com