nfc

Writing an image using NdefMessage

廉价感情. 提交于 2019-12-07 21:52:24
问题 I am trying to write an image on a Ndef Tag, currently, i am able to write it, but when I try to read it with any market application, they treat it like a text message. here is my piece of code writing the image : Bitmap mBitmap = Bitmap.createScaledBitmap(mPhoto, 100, 100, true); ByteArrayOutputStream stream = new ByteArrayOutputStream(); mBitmap.compress(Bitmap.CompressFormat.PNG, 100, stream); byte[] byteArray = stream.toByteArray(); NdefRecord picRecord = new NdefRecord(NdefRecord.TNF

Android NFC start app (using AAR) and read text

混江龙づ霸主 提交于 2019-12-07 20:42:25
I have NFC tag with plain text and AAR. When I tap an NFC to the phone, my app will start. But It just call onCreate() method and don't read the plain text. I have to tap again and then app will read the text. Can I somehow start app when I tap an NFC and at the sametime read the text? I use this manual for implement NFC function. To make sure that you also receive the NDEF message, make sure that you have added an Intent filter for the type of message that is on the tag. 来源: https://stackoverflow.com/questions/20082064/android-nfc-start-app-using-aar-and-read-text

How to do NFC peer to peer connection in android? [closed]

让人想犯罪 __ 提交于 2019-12-07 20:27:02
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I need to do peer to peer connection between two nfc enabled device, i need some tutorial to do it if anyone done it send me link or

Why Android & IOS11 cannot communicate via NFC

瘦欲@ 提交于 2019-12-07 17:40:34
问题 Currently using React Native and attempting to use react-native-nfc-ios and react-native-nfc so I can have cross-device communication between ios and Android. I'm finding that they cannot communicate, however I think it's due to a broader issue (as other existing apps also don't work). If I download a NFC reader app on iPhone 7, and an NFC writer app on Android they cannot communicate. Why is this? Instructions to Duplicate Turn on NFC Reader on iPhone 7 Put some arbitrary data in NFC write

Is the RFID RC522 capable of reading NFC tags?

旧时模样 提交于 2019-12-07 17:20:36
问题 I recently purchased the RFID RC522 reader/writer,along with some NFC Mifare classic 1K 13.56mhz tags. The seller on Amazon mentioned that the NFC tags were compatible with the rc522 reader/writer; however, I have not been able scan the tags. I was wondering, is it really possible to scan NFC tags with the RC522 reader/writer? thanks nfc tags RFID RC522 module 回答1: The RC522 operates at 13.56 Mhz which is NFC's frequency, and the spec sheet says it natively supports: mifare1 S50, mifare1 S70

How to interpret NDEF content on Mifare Classic 1K

雨燕双飞 提交于 2019-12-07 14:47:30
问题 I write a text to a Mifare Classic 1K tag using the NFC Tools app on my Android device (through the built-in NFC reader). This text is "moretto" (my last name). Then, I'm trying to read this text (NDEF format) using the NFC reader ACR1255U with the library provided by ACS. I am able to get following: Read block 4: FF B0 00 04 10 response: 0000030ED1010A5402656E6D6F726574 9000 Read block 5: FF B0 00 05 10 response: 746FFE00000000000000000000000000 9000 I know that FE indicates the end of

Force PC/SC driver on ACR122U NFC reader

假如想象 提交于 2019-12-07 11:41:41
问题 I have trouble with using my ACR122U RFID card reader form ACS. I need to connect it to my Mac using the PC/SC driver. I installed the driver from the ACS website and confirmed that it's running. However, whenever I test using the nfc-list command, I get the following error: nfc-list uses libnfc libnfc-1.7.1-189-g2869ae2 error libnfc.driver.acr122_usb Unable to claim USB interface (Permission denied) nfc-list: ERROR: Unable to open NFC device: acr122_usb:020:002 As far as I've understood from

Android NFC手机的三种工作模式

帅比萌擦擦* 提交于 2019-12-07 11:34:56
Android 支持NFC功能,但是需要硬件的支持,带NFC功能的手机支持3种工作模式:读写模式、点对点模式、仿真卡模式,下面分别介绍 读写模式 这种模式中Android设备扮演的是读卡器的角色,可以从NFC标签中读取数据或写入数据。数据在NFC芯片中,可以简单理解成“刷标签”。本质上就是通过支持NFC的手机或其它电子设备从带有NFC芯片的标签、贴纸、名片等媒介中读写信息。通常NFC标签是不需要外部供电的。当支持NFC的外设向NFC读写数据时,它会发送某种磁场,而这个磁场会自动的向NFC标签供电。 点对点模式 该模式允许支持NFC的Android设备与其他NFC设备交换数据,在Android中该模式是通过Android Beam技术实现的。点对点模式与蓝牙、红外差不多,用于不同NFC设备之间进行数据交换,不过这个模式已经没有有“刷”的感觉了。其有效距离一般不能超过4厘米,但传输建立速度要比红外和蓝牙技术快很多,传输速度比红外块得多,如过双方都使用Android4.2,NFC会直接利用蓝牙传输。这种技术被称为Android Beam。所以使用Android Beam传输数据的两部设备不再限于4厘米之内。 点对点模式的典型应用是两部支持NFC的手机或平板电脑实现数据的点对点传输,例如,交换图片或同步设备联系人。因此,通过NFC,多个设备如数字相机,计算机,手机之间,都可以快速连接

Android之NFC

末鹿安然 提交于 2019-12-07 11:34:39
NFC简介: Near Field Communication 近场通信,是一种数据传输技术。 与wifi、蓝牙、红外线等数据传输技术的一个主要差异就是有效距离一般不能超过4cm。 NFC支持3种工作模式: 1.读卡器模式; 2.仿真卡模式; 3.点对点模式; 1.读卡器模式: 通过NFC设备(支持NFC的Android手机)从带有NFC芯片的标签、贴纸、报纸、明信片等媒介读取信息,或将数据写到这些媒介中。 2.仿真卡模式: 是将支持NFC的手机或其他电子设备当成借记卡、信用卡、公交卡、门禁卡等IC卡使用;基本原理是将相应的IC卡中的信息(支付凭证)封装成数据包存储在支持NFC的手机中,在使用时还需要一个NFC射频器(相当于刷传统IC卡时使用的刷卡器),将手机靠近NFC射频器,手机就会收到NFC射频器发过来的信号,在通过一系列复杂的验证后,将IC卡的相应信息传入NFC射频器,最后这些IC卡数据会传入NFC射频器连接的计算机,并进行相应的处理(如电子转账、开门等操作)。 3.点对点模式: 与蓝牙、红外差不多,可以用于不同的NFC设备之间进行数据交换,只是NFC的点对点模式有效距离更短,不能超过4cm;但是如果两个设备使用的都是Android4.2及以上版本,NFC会直接利用蓝牙传输,这种技术被称为Android Beam,所以Android

android NFC的读写

旧城冷巷雨未停 提交于 2019-12-07 11:34:18
一、NFC知识 1、NFC是什么? NFC,即Near Field Communication,近距离无线通讯技术,是一种短距离的(通常<=4cm或更短)高频(13.56M Hz)无线通信技术,它提供了一种简单、触控式的解决方案,可以让消费者简单直观地交换信息、访问内容与服务 。 2、NFC的技术优势? 与蓝牙相比:NFC操作简单,配对迅速 与RFID相比:NFC适用范围广泛、可读可写,能直接集成在手机中 与红外线相比:数据传输较快、安全性高、能耗低 与二维码相比:识别迅速、信息类型多样 将来与移动支付相结合,势必简化支付的购买流程,重塑消费者的购物模式。 二、android下读写NFC 1、在AndroidManifest.xml中申明NFC权限 < uses-permission android:name = "android.permission.NFC" /> <!-- 这项不一定需要,可以在android market中显示有NFC硬件 --> < uses-feature android:name = "android.hardware.nfc" android:required = "true" /> 2、NFC TAG的发布系统 当android设备扫描到一个NFC标签时,会自动寻找最适合的activity来处理这个TAG,如果有多个activity满足条件的话