J2ME 支持 HTML5 吗?
我想为 J2ME 手机制作一个应用程序。
在该应用程序中我想使用 HTML5,
我怎样才能做到这一点?
我在 LWUIT 工作过。 LWUIT 支持 HTML5 吗?
或者给我任何其他浏览器信息。
I want to make an application for J2ME phones.
In that application I want to use HTML5,
how I can do this?
I worked on LWUIT. Does LWUIT support HTML5?
Or give me any other browser info.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
LWUIT/Codename One 支持 HTML5,但不支持 J2ME。
LWUIT/Codename One support HTML5 but not on J2ME.
J2ME 中没有内置的 HTML5(或任何 HTML 版本)解析器或渲染器。 LWUIT 库中有某种 HTML 查看器支持,但我怀疑它总体上是相当有限的,特别是在特定的 HTML5 支持方面。无论如何,研究 LWUIT 并看看它是否足以满足您的需求(在不知道您的真实/实际需求的情况下很难说)。
编写自己的 HTML 解析器和渲染器也不太实用(特别是如果您还需要能够处理 CSS 和 JavaScript)。本质上,您必须用 J2ME 编写您自己的完整 Web 浏览器。
当然,您可以使用 platformRequest() 启动默认浏览器,但目前还没有多少手机支持 HTML5。
如果您还管理服务器端(HTML5 页面的来源),并且您真正需要的只是数据,那么编写服务器代码以将数据以 XML 或 JSON 形式返回/发送到 J2ME MIDlet,这很重要更容易处理。
There's no built-in HTML5 (or any HTML version, for that matter) parser or renderer in J2ME. There's some sort of HTML viewer support in the LWUIT library, but I suspect it is reasonably limited in general, and also in particular regarding specifically HTML5 support. In any case, research LWUIT and see if it is enough for your needs or not (hard to say without knowing your real/actual requirements).
It is also not very practical to write your own HTML parser and renderer (especially if you also need to be able to handle CSS and JavaScript). In essence, you'd have to write your own complete web browser in J2ME.
You can, of course, use platformRequest() to launch the default browser, but not that many mobile phones have HTML5 support yet.
If you also manage the server-side (where the HTML5 pages come from), and all you really need is the data, then write the server code to return/send the data to your J2ME MIDlet as either XML or JSON, which are much easier to handle.