android - Android 操作系统上的 NFC 堆栈

标签 android sdk nfc open-nfc

有人可以帮助我了解 NFC Android 堆栈的当前状态吗?随着 OS 2.3 发布了小型 NFC 支持(仅限于 NXP 标签读取),后来 Google 扩充了 API,因此在 OS 2.3.3 中范围更广支持标签,也支持 p2p。

我的问题是Open NFC 堆栈 ( http://www.open-nfc.org/ ) 如何适应当前状态?

据我了解,Open NFC 堆栈是并行 Activity ,是当前堆栈的可选替代品。由于它的描述,它克服了谷歌 NFC 堆栈实现的一些限制,并使新的硬件适应(即支持新标签类型)更容易......

据我了解,此堆栈旨在供设备制造商而非移动开发人员使用——对吗?或者是否可以下载 Open NFC 堆栈,将其编译为库,放入 .apk 并使用 Google 堆栈作为替代?

但即使是应用程序开发人员也有可能使用 Open NFC 堆栈——它对新的 2.3.3 操作系统功能有意义吗?

最佳答案

Can someone help me understanding the current state of the NFC Android stack? With the OS 2.3 there was released small NFC support (limited only to NXP tags reading), later the Google augment the API, so in OS 2.3.3 the wider range of tags is supported and also p2p is possible.

My question is how the Open NFC stack (http://www.open-nfc.org/) fits into current state??

目前(Android 2.3.4),Android 平台未集成 Open NFC 堆栈。这个堆栈有几个优点:不限于一种特定的 NFC 硬件,可移植到许多不同的环境(不仅是 Android),与当前堆栈相比有许多附加功能。另一方面,由于 Open NFC 不是标准 Android 环境的一部分,因此需要做一些工作(但实际上很容易)才能在 Android 平台中使用此堆栈。 Open NFC 文档描述了这个过程。

As I understand 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…

正确。

To my understanding this stack is intended to by used by device manufacturers, not mobile developers – is that right? Or is it possible to download the Open NFC stack, compile it as a library, put into .apk and use as an alternative the Google stack?

不幸的是,由于标准 Android 内核不支持模块加载,Open NFC 堆栈不能作为另一个应用程序简单地安装,它需要更改内核。但是一旦更换了内核,部署和使用 Open NFC 堆栈就非常容易了。

But even it will be possible for application developers to use the Open NFC stack – does it make sense with the new 2.3.3 OS features?

应用程序开发人员可能应该坚持操作系统功能,即使有更多限制,因为它们确保代码在任何支持 NFC 的手机上的可移植性。但是,如果您尝试使用比 Android 自带的“更多”功能,Open NFC 是一个不错的选择。

希望这有助于...

关于android - Android 操作系统上的 NFC 堆栈,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6055627/

相关文章:

iphone - UML:如何为移动应用程序(iPhone/iOS、Android)建模 UI 和后台线程

java - 在特定 View 上方显示 PopupWindow

android - 如果我使用 Android 4 平台编写应用程序,该应用程序可以在 Android 2 设备上运行吗?

android - processCommandApdu 方法中 HostApduService 的问题

android - 基于标签的 NFC 监听器触发器

android - 如何为 Google map 替换或删除我的位置蓝点周围的圆圈

java - 如何在 Android 上安全地存储密码?

iphone - 在调用 presentOpenInMenuFromRect 之前检查它是否存在可以打开文件的应用程序

flutter - 我在 Flutter SDK 中使用哪个 channel ?

android - 未检测到写入 mifare 1k 卡中的 Ndef 数据