IsoDep

类概述:

Provides access to ISO-DEP (ISO 14443-4) properties and I/O operations on a Tag.

Acquire an IsoDep object using get(Tag).

The primary ISO-DEP I/O operation is transceive(byte[]). Applications must implement their own protocol stack on top of transceive(byte[]).

Tags that enumerate the IsoDep technology in getTechList() will also enumerate NfcA or NfcB (since IsoDep builds on top of either of these).

Note: Methods that perform I/O operations require the NFC permission.

该类提供了访问ISO-DEP(ISO 14443 - 4)标记属性和I / O操作。

使用 get(Tag) 函数可以获得一个IsoDep对象。

主要的ISO-DEP I / O操作是 transceive(byte[]) 函数(核心函数)。应用程序必须他们自己的实现协议栈之上使用 transceive(byte[]) 函数。

使用 getTechList() 函数会列举IsoDep还将列举NfcA或NfcB(因为IsoDep构建在这两种技术其中一种之上的)。

注意:执行I / O操作的方法需要获取NFC权限。

核心函数:public byte[] transceive (byte[] data)

Send raw ISO-DEP data to the tag and receive the response.

Applications must only send the INF payload, and not the start of frame and end of frame indicators. Applications do not need to fragment the payload, it will be automatically fragmented and defragmented by transceive(byte[]) if it exceeds FSD/FSC limits.

Use getMaxTransceiveLength() to retrieve the maximum number of bytes that can be sent with transceive(byte[]).

This is an I/O operation and will block until complete. It must not be called from the main application thread. A blocked call will be canceled with IOException if close() is called from another thread.

向标签 tag发送原始ISO-DEP数据和接收响应。

应用程序必须只发送the INF payload,而不是payload的开始碎片和payload的结束碎片。应用程序不需要拆分payload,使用transceive(byte[])函数将自动分散和整理payload,如果它超过FSD / FSC的限制。

使用getMaxTransceiveLength()函数来检索transceive(byte[])能发送的最大字节数。

这是一个I / O操作,将阻塞,直到操作完成。在主应用程序线程,它不能被调用。如果在另一个线程调用close()函数,该操作调用将被取消并抛出IOException异常。

2.IsoDep类的更多相关文章

  1. 3.非标准的NDEF格式数据解析--IsoDep

    1.使用目的:正常开发是针对NDEF格式数据进行开发,但实际情况并非如此,以厦门公交卡为例,厦门公交卡保存的是非NDEF格式数据.其类型是IsoDep类型. 2.非标准的NDEF格式数据流程:当厦门公 ...

  2. Java类的继承与多态特性-入门笔记

    相信对于继承和多态的概念性我就不在怎么解释啦!不管你是.Net还是Java面向对象编程都是比不缺少一堂课~~Net如此Java亦也有同样的思想成分包含其中. 继承,多态,封装是Java面向对象的3大特 ...

  3. 【译】基于主机的卡仿真(Host-based Card Emulation)

    基于主机的卡仿真(Host-based Card Emulation) 能提供NFC功能很多Android手机已经支持NFC卡模拟.在大多数情况下,该卡是由设备中的单独的芯片仿真,所谓的安全元件.由无 ...

  4. Android API Guides---Host-based Card Emulation

    Host-based Card Emulation 很多提供NFC功能的Andr​​oid手机已经支持NFC卡模拟.在大多数情况下.该卡是由在该装置的单独芯片仿真,称为安全元件. 无线运营商提供了非常 ...

  5. 6.NFC之非NDEF格式

    先看流程图 使用步骤: 第一步:声明权限 <!-- 允许应用程序使用NFC功能 --> <uses-permission android:name="android.per ...

  6. C++ 可配置的类工厂

    项目中常用到工厂模式,工厂模式可以把创建对象的具体细节封装到Create函数中,减少重复代码,增强可读和可维护性.传统的工厂实现如下: class Widget { public: virtual i ...

  7. Android请求网络共通类——Hi_博客 Android App 开发笔记

    今天 ,来分享一下 ,一个博客App的开发过程,以前也没开发过这种类型App 的经验,求大神们轻点喷. 首先我们要创建一个Andriod 项目 因为要从网络请求数据所以我们先来一个请求网络的共通类. ...

  8. ASP.NET MVC with Entity Framework and CSS一书翻译系列文章之第二章:利用模型类创建视图、控制器和数据库

    在这一章中,我们将直接进入项目,并且为产品和分类添加一些基本的模型类.我们将在Entity Framework的代码优先模式下,利用这些模型类创建一个数据库.我们还将学习如何在代码中创建数据库上下文类 ...

  9. ASP.NET Core 折腾笔记二:自己写个完整的Cache缓存类来支持.NET Core

    背景: 1:.NET Core 已经没System.Web,也木有了HttpRuntime.Cache,因此,该空间下Cache也木有了. 2:.NET Core 有新的Memory Cache提供, ...

随机推荐

  1. cloud.cfg_for_ubuntu

    user: default disable_root: false preserve_hostname: false cloud_init_modules: - bootcmd - resizefs ...

  2. Small组件化重构安卓项目

    如果从一开始就没有设计好 后面项目业务比较大的时候很难掉头

  3. RMAN 增量备份级别说明

    通过Bat批处理调用RMan是我们定时备份数据库的好帮手,但是RMan的备份级别需要我们好好了解一下. RMAN备份全为全备和增量备份 增量备份:分为0 1 2级 ORACLE官方解释: A leve ...

  4. vue & lifecycle methods & this bug & ES6 Arrow function & this bind bug

    vue & lifecycle methods & this bug ES6 Arrow function & this bind bug bad fetchTableData ...

  5. JAVA File方法各类文件复制操作

    import java.io.*; public class AllFile { public static void main(String[] args) throws Exception {// ...

  6. poj 3311 floyd+dfs或状态压缩dp 两种方法

    Hie with the Pie Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 6436   Accepted: 3470 ...

  7. ACdream 1023 抑或

    Xor Time Limit: 2000/1000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others) Submit Statisti ...

  8. RHN Classic and Red Hat Subscription Management

    What's the difference between RHN Classic and Red Hat Subscription Management? Introduction With the ...

  9. SHH框架的搭建

    建立一个Web项目,然后导入如下包 l  struts2包:在struts2-blank.war下的lib目录下,以及struts-2.3.15.1\lib下的struts和spring整合的插件包s ...

  10. Angular(三)

    一.使用Module(模块)组织依赖关系 模块提供了一种方法,可以用来组织应用中一块功能区域的依赖关系:同时还提供了一种机制,可以自动解析依赖关系(又叫做依赖注入).一般来说,我们把这些叫做依赖服务, ...