nfc

Android NFC近场通信2——NFC标签调度

拈花ヽ惹草 提交于 2020-03-10 18:14:01
  上面一篇文章简单介绍了NFC的背景和技术应用,今天主要是讲解一下NFC如何发起通信和标签通信(主要是翻译android官网的资料,中间加入个人心得)。 NFC总是在一个发起者和一个被动目标之间发生。发起者发出近场无线电波,这个近场可以给被动目标供电。这些被动的目标包括不需要电源的标签,卡,也可以是有电源的设备。拿我们手机来说,我们手机打开NFC功能后就是一个发起者,被动目标一般就是NFC标签。我们通过读取NFC标签内容,达到获取数据目的。    1、Tag发布系统   当android设备扫描到一个NFC tag,通用的行为是自动找最合适的Activity会处理这个tag Intent而不需要用户来选择哪个Activity来处理。因为设备扫描NFC tags是在很短的范围和时间,如果让用户选择的话,那就有可能需要移动设备,这样将会打断这个扫描过程。你应该开发你只处理需要处理的tags的Activity,以防止让用户选择使用哪个Activity来处理的情况。Android提供两个系统来帮助你正确的识别一个NFC tag是否是你的Activity想要处理的:Intent发布系统和前台Activity发布系统。 Intent发布系统检查所有Activities的intent filters,找出那些定义了可以处理此tag的Activity

Prevent URL obtained from NFC from being shared or accessed remotely

笑着哭i 提交于 2020-03-05 00:38:30
问题 one advantage of NFC vs QR code is that unlike QR code which can be photographed and accessed from anywhere later, an NFC binds you to scan the NFC chip from close distance in order to access the info. But, once scanned and your browser is ready to open the URL, what prevents the user from sharing the URL so that others can use it and access it remotely (or to use it twice, when already away from the NFC tag)? My use case is to let a person who is physically near the NFC device, to submit

Prevent URL obtained from NFC from being shared or accessed remotely

给你一囗甜甜゛ 提交于 2020-03-05 00:33:09
问题 one advantage of NFC vs QR code is that unlike QR code which can be photographed and accessed from anywhere later, an NFC binds you to scan the NFC chip from close distance in order to access the info. But, once scanned and your browser is ready to open the URL, what prevents the user from sharing the URL so that others can use it and access it remotely (or to use it twice, when already away from the NFC tag)? My use case is to let a person who is physically near the NFC device, to submit

Android P在SystemUI Statusbar中添加NFC图标

折月煮酒 提交于 2020-02-25 14:25:49
Android P系统中开启NFC时,系统的状态栏中没有NFC图标,加强用户使用体验,故在SystemUI状态栏中添加NFC图标。该修改主要基于NFC开启的广播,通过接受广播,获取NFC的状态值,依据NFC的状态值显示或者隐藏NFC图标。 1.添加对应的图标,建议使用SVG。 frameworks/base/packages/SystemUI/res/drawable/stat_sys_nfc.xml <?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="17dp" + android:width="17dp" + android:viewportHeight="1024" + android:viewportWidth="1024" > + <path android:fillColor="#FF000000" + android:pathData="M624,444.44v149.33L312.89,307.56v448C312.89,904.43 424.89,967.11 424.89,967.11h-99.56c-66.08,-24.87 -108.71,-122.24 -112

Android NFC scan time

百般思念 提交于 2020-02-21 15:14:15
问题 I am working with Android and ISO14443 type B tags and there is an issue that I am not able to solve. Hopefully someone can give a hint. When NFC setting of the phone are turned on, it starts sending REQA and REQB commands in order to discover if any tag is present. The issue is that by default this is done with a periodicity of 2 seconds and I would like to modify that time to make it shorter. I see that most apps maintain this scan period, but there are some apps such as TagInfo from NXP

Android NFC scan time

怎甘沉沦 提交于 2020-02-21 15:11:25
问题 I am working with Android and ISO14443 type B tags and there is an issue that I am not able to solve. Hopefully someone can give a hint. When NFC setting of the phone are turned on, it starts sending REQA and REQB commands in order to discover if any tag is present. The issue is that by default this is done with a periodicity of 2 seconds and I would like to modify that time to make it shorter. I see that most apps maintain this scan period, but there are some apps such as TagInfo from NXP

Android NFC scan time

一世执手 提交于 2020-02-21 15:10:13
问题 I am working with Android and ISO14443 type B tags and there is an issue that I am not able to solve. Hopefully someone can give a hint. When NFC setting of the phone are turned on, it starts sending REQA and REQB commands in order to discover if any tag is present. The issue is that by default this is done with a periodicity of 2 seconds and I would like to modify that time to make it shorter. I see that most apps maintain this scan period, but there are some apps such as TagInfo from NXP

Android NFC scan time

断了今生、忘了曾经 提交于 2020-02-21 15:06:34
问题 I am working with Android and ISO14443 type B tags and there is an issue that I am not able to solve. Hopefully someone can give a hint. When NFC setting of the phone are turned on, it starts sending REQA and REQB commands in order to discover if any tag is present. The issue is that by default this is done with a periodicity of 2 seconds and I would like to modify that time to make it shorter. I see that most apps maintain this scan period, but there are some apps such as TagInfo from NXP

Reading a NFC Mifare card with NXP Reader Library

南笙酒味 提交于 2020-02-21 06:22:59
问题 I'm trying to read the content of a Mifare Ultralight card using the NFC Reader Library. I'm totally new with NFC and I'm using this github repository to start. The code in this repo allows to detect which type of card is detected (Mifare, Mifare ultralight ...) and read the UID of the card. I added this code in order to read the content of a Mifare ultralight card: uint8_t bBufferReader[96]; memset(bBufferReader, '\0', 0x60); PH_CHECK_SUCCESS_FCT(status, phalMful_Read(&alMful, 4,

Reading a NFC Mifare card with NXP Reader Library

这一生的挚爱 提交于 2020-02-21 06:17:10
问题 I'm trying to read the content of a Mifare Ultralight card using the NFC Reader Library. I'm totally new with NFC and I'm using this github repository to start. The code in this repo allows to detect which type of card is detected (Mifare, Mifare ultralight ...) and read the UID of the card. I added this code in order to read the content of a Mifare ultralight card: uint8_t bBufferReader[96]; memset(bBufferReader, '\0', 0x60); PH_CHECK_SUCCESS_FCT(status, phalMful_Read(&alMful, 4,