HTML5可以在手机上访问NFC芯片吗? [英] Can HTML5 access NFC chips on mobile phones

查看:229
本文介绍了HTML5可以在手机上访问NFC芯片吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不太熟悉HTML5所以有人知道HTML5是否能够访问内置于移动设备的NFC芯片?或者,有人可以使用其他方法建议另一种方法吗?我的目标是制作一个跨平台的HTML5网络应用程序,可以在配备NFC的手机上访问NFC功能。我已经研究过像PhoneGap这样的移动框架,但是虽然他们的路线图上有NFC,但他们没有任何时间表,也没有提供实施细节。

I'm not too familiar with HTML5 so does anyone know if HTML5 will be able to access NFC chips built into mobile devices? Or, can someone suggest another way to do this using some other method? My goal is to produce a cross platform HTML5 web app that can access NFC functionality on NFC equipped phones. I have looked into mobile frameworks like PhoneGap but although they have NFC on their roadmap, they do not have any timelines nor implementation details to offer.

谢谢。

推荐答案

通过某些专有框架进行NFC访问可能是可能的,但我认为它目前没有内置于HTML 5规范本身

NFC access via some proprietary framework may be possible, but I don't think it's currently built into the HTML 5 spec itself.

PhoneGap使用HTML5作为移动应用程序的主要UI,然后获取您编写的特定代码(我认为是javascript API),然后将其转换为移植到的每个移动设备的本机代码。因此,您有一个选项是在HTML5中构建主UI,然后在本机应用程序内的WebView或等效内容中显示它,然后通过本机应用程序访问NFC特定功能,并通过动态URL将其传递给您的webapp,如 http://mysampleapp.com/NFC/somestringofdatafromthenfcthatiwillparsetouseinmyhtml5app

PhoneGap uses HTML5 for the main UI of the mobile application, and then takes specific code that you write (javascript API I think), which is then translated into native code for each of the mobile devices it is ported to. So, one option you have is building your main UI in HTML5, and then displaying that in a WebView or equivalent inside a native application, then accessing NFC specific features via the native application and passing it to your webapp via a dynamic URL like http://mysampleapp.com/NFC/somestringofdatafromthenfcthatiwillparsetouseinmyhtml5app

这篇关于HTML5可以在手机上访问NFC芯片吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆