从原生 Android 代码访问 html5 存储

发布于 2024-12-10 16:31:01 字数 80 浏览 3 评论 0原文

我已经在android中开发了phonegap应用程序,现在需要从应用程序中的本机代码/android服务更新和访问本地存储数据。有办法这样做吗?

I have developed phonegap application in android, now there is a requirement to update and access localstorage data from native code/android service in application. Is there a way to do so?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

丑疤怪 2024-12-17 16:31:01

一般来说,您可以从本机代码(通过 webview 对象)触发 javascript 函数,然后访问本地存储。

希望这有帮助!如果您需要更具体的内容,请拍摄!

In general, you can trigger a javascript function from your native code (via the webview object) and then access the localstorage.

Hope this helps! If you need something more specific, please shoot it!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文