Differences between Google NFC API and Open NFC API

本文深入探讨了Android平台下OpenNFC技术栈的优劣与使用方法,指出其作为非标准组件的特性及其对不同环境的适配性。强调了此技术栈在实现更多NFC功能方面的潜力,但同时也指出了由于其非内置性带来的安装与部署工作。建议开发者根据项目需求选择是否采用此技术栈,并概述了其与GoogleNFC堆栈之间的对比,最终得出结论,直到某手机制造商整合该技术栈,OpenNFC的吸引力有限。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

link NFC Google API:[url]http://developer.android.com/resources/samples/NFCDemo/index.html[/url]

link NFC Open API: [url]http://www.open-nfc.org/opennfc_library/overview-summary.html[/url]
At the moment (Android 2.3.4), the Android platform does not integrate the Open NFC stack. This stack has several advantages: not limited to one particular NFC hardware, portable to many different environments (not only Android), many additional features compared to the current stack. On the other hand, because Open NFC is not part of the standard Android environment, it requires some work (but it is actually quite easy) to use this stack in an Android platform. The Open NFC documentation describes this process.

The Open NFC stack is parallel activity and is optional replacement to the current stack. Due to its description it overcomes some limits of the Google NFC stack implementation and makes new HW adaptions (i.e. support for new tag types) easier…

This stack is intended to by used by device manufacturers, not mobile developers, because the standard Android kernel does not support modules loading, the Open NFC stack cannot be simply installed as another application, it requires a kernel change. But once the kernel is replaced, it is quite easy to deploy and use the Open NFC stack. An application developer should probably stick to the OS features, even if more limited, since they assure the portability of the code over any NFC-enabled phone. But if you are trying to use "more" features than what comes with Android, Open NFC is a good candidate.

In Conclusion : Until some phone manufacturer will integrate the stack into device, it does not make too much sense to be interested in Open NFC stack. An app developer cannot make use of Open NFC unless it is on hardware.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值