Android Near Field Communication

网友投稿 602 2022-05-29

译自 https://developer.android.google.cn/guide/topics/connectivity/nfc/index.html

Near Field Communication (NFC) is a set of short-range wireless technologies, typically requiring a distance of 4cm or less to initiate a connection. NFC allows you to share small payloads of data between an NFC tag and an Android-powered device, or between two Android-powered devices.

近场通讯(NFC)是一系列的短距离无线通信技术。通常需要4cm或更短的距离来发起连接。NFC允许你在NFC标签和Android设备之间,或两台Android设备之间分享小载荷的数据。

Tags can range in complexity. Simple tags offer just read and write semantics, sometimes with one-time-programmable areas to make the card read-only. More complex tags offer math operations, and have cryptographic hardware to authenticate access to a sector. The most sophisticated tags contain operating environments, allowing complex interactions with code executing on the tag. The data stored in the tag can also be written in a variety of formats, but many of the Android framework APIs are based around a NFC Forum standard called NDEF (NFC Data Exchange Format).

标签的范围可以很复杂。简单的标签只是提供了读写简单语意,有些时候,在一次性编程领域会制作一些只读的卡片。负责的标签提供了数学运算,并且有加密固件对访问的区域进行认证。最复杂的标签包括操作环境,允许在该标签上执行复杂的交互代码。数据可以用各种各样的格式存储到标签上,但是大多数Android框架应用程序接口都基于一个标准的NFC Forum,称为NDEF(NFC Data Exchange Format)。

Android-powered devices with NFC simultaneously support three main modes of operation:

Reader/writer mode, allowing the NFC device to read and/or write passive NFC tags and stickers.

P2P mode, allowing the NFC device to exchange data with other NFC peers; this operation mode is used by Android Beam.

Card emulation mode, allowing the NFC device itself to act as an NFC card. The emulated NFC card can then be accessed by an external NFC reader, such as an NFC point-of-sale terminal.

带NFC的Android设备同时支持了以下三种操作:

1. 读写模式,允许NFC设备被动地读或者写NFC标签和贴纸。

2. P2P模式,允许NFC设备和其它对等的NFC设备交换数据;该操作模式由Android Beam使用。

3. 模拟卡片模式,允许NFC设备自己作为一张NFC卡片。它模拟的NFC卡片接触到外部的NFC读卡器,就像一个NFC销售点终端机。

NFC Basics

(译:NFC基础技术)

This document describes how Android handles discovered NFC tags and how it notifies applications of data that is relevant to the application. It also goes over how to work with the NDEF data in your applications and gives an overview of the framework APIs that support the basic NFC feature set of Android.

该文档描述了Android如何操作已经发现的NFC标签和它如何通知相关的应用程序。它也会让你再温习一遍在你应用内的NDEF数据是如何工作的,并且给出了Android支持的一系列NFC特性的应用程序框架的概要。

Advanced NFC

(译:高级的NFC)

This document goes over the APIs that enable use of the various tag technologies that Android supports. When you are not working with NDEF data, or when you are working with NDEF data that Android cannot fully understand, you have to manually read or write to the tag in raw bytes using your own protocol stack. In these cases, Android provides support to detect certain tag technologies and to open communication with the tag using your own protocol stack.

该文档超过了提供的应用程序接口,允许使用更丰富的Android支持的标签技术。当你不使用NDEF数据,或者当你使用的NDEF数据Android不能够顽强理解时,你就必须使用基于你自己的协议栈的原始的字节数组手动地读写该标签。在这种情况下,Android提供检测已经确定的标签的支持,和使用你自己的协议栈进行通信。

Host-based Card Emulation

(译:基于主机的卡片模拟器)

This document describes how Android devices can perform as NFC cards without using a secure element, allowing any Android application to emulate a card and talk directly to the NFC reader.

该文档描述了如何Android设备在不使用安全元件的情况下怎样才能表现的和NFC卡一样,允许任何Android应用模拟一个卡片直接与NFC读卡器通信。

Android Near Field Communication

Android

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:《Istio入门与实战》 ——2 实验说明
下一篇:温故Linux后端编程(二):进程·全家桶
相关文章