NFC device as a Reader for another Android HCE - android

I wanted to use my Android mobile as a reader to communicate to my android HCE(Host card EMulation) App. In internet I found the sample client application code for ACS Reader(PC Reader). Instead of that I would like to use my Android phone as a NFC Reader.
I found some sample for Mifare cards for Android, not for HCE communication
Please share If in case any sample code URL /API to help me for the same. Thank You

Not really sure what you are asking for, but here are two samples. One if for an Android NFC reader app and one is for an Android HCE app.
https://github.com/googlesamples/android-CardReader
https://github.com/googlesamples/android-CardEmulation
Please clarify your question if I did not understand you correctly.
CardReader
This sample demonstrates how to implement a low-level NFC card reader, for reading cards that do not contain NDEF or Android Beam data. This sample is designed to read the virtual loyalty card implemented in the CardEmulation sample.
In particular, this sample demonstrates how to disable Android Beam, select which AIDs the reader is interested in, and establish communication with the card. See Host-based Card Emulation for more information on the HCE APIs.
CardEmulation
This sample demonstrates how to emulate an NFC card, using the Host Card Emulation feature added in Android 4.4. This sample makes the device appear as a loyalty card whenever the screen is on and the user taps their device on an appropriately configured NFC reader.
The CardReader sample can be used to read the loyalty card implemented in this sample.

You can use an Android device (NFC+Kitkat onwards) in reader mode. Use NFCAdapter enableReaderMode function. This blog has complete sample.
Thanks

If I understand correclty your issue, you want to use one android device as an NFC reader to communicate with an HCE application installed on another android device. Am I right?
In this case, I do not think this is possible, because when you approach 2 NFC android devices, they will start to communicate in P2P.
In order to activate the CE mode on your "reading" device, you would need to deactivate the P2P feature, which is not possible if your phone is not rooted.

Related

Is it possible to transfer data to NFC tag without Beam? Any alternatives?

We have an Android app that writes data to a NFC tag using Android Beam. After deprecation of Beam in sdk 29, is there any alternative for data transference with a NFC tag?
Is it possible to use Google Nearby Share with a NFC tag?
I didn't found any documentation for it.
Google Nearby Share is Bluetooth or Wifi Direct as these were deemed by method to transfer data in the deprecation of Android Beam.
It should be technically possible to still transfer data via NFC without Android Beam, though there are some technical difficulties to over come.
One Device pretends to be a NFC Card with Host Card Emulation (HCE) and the other device reads/writes to it as if it was a normal Type 4 NFC card.
There are some complications if one device still has Android Beam but using the enableReaderMode NFC API to read/write to the Emulated Card should get around this.
I think some people of StackOverflow have tried this, I have not personally but the process of using HCE should be technically possible.

Why Android & IOS11 cannot communicate via NFC

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 mode on Android
Bringing devices together has no effect.
Not understanding the intricacies of NFC, it's hard for me as a casual programmer to understand what the actual problem is.
I understand that IOS11 on iPhone 7 (plus) supports NFC read, and generally speaking there are card emulation, peer to peer, and read write modes.
Should they not communicate? The iPhone is not able to pick up the
Android writer. Why is this?
How does card emulation (I assume to be Apple Pay), differ from a write mode?
The reason is because Apple's iOS 11 update only allows reading from NFC tags (writing is only permitted for Apple Pay). At the moment, their software does not share the same enjoyment afforded by Android phones which enable card emulation, peer-to-peer, and reader/writer NFC usage. So our only hope is to wait for a software update that will finally enable this existing feature for developers to use.

Read NFC cards with ACR 1252u on Android

We have a ACR 1252u NFC card reader. We want to read/write NFC cards on Android with this device. The problem is that this device is not seen as a NFC device but as a USB device instead. Therefore native Android NFC can not be used. Currently we are able to detect the device and to trigger an event by adding or removing a card. But we are neither able to read nor to write a card. In the documentation we found some HEX codes that are transmitted to the device, but we did not figure out how they work in order to read/write cards. Also on the net we found some example codes using other ACR devices but obviously they are not compatible to our one.
I am looking for any working examples in order to get the ACR1252u reading/writing NFC cards on Android.
The reader is a USB CCID (chip card interface device, see http://www.usb.org/developers/docs/devclass_docs/) device. Hence, you need to implement the PC/SC abstraction layer (see http://www.pcscworkgroup.com/specifications/overview.php) or use some ready-made library in order to send smartcard commands to that reader.

NFC programming without NFC chip in Tablets / Phones?

A short question but can't find no confirmation on other Forums. Hopefully someone knows on stackoverflow.
QUESTION: if I have a tablet that does not have a NFC chip inside, but I use an external NFC reader (With Android Support Library) connected to the tablet - can I still manipulate the data (read / write) from the NFC card (tapped on the external NFC reader) through my Application on Tablet ?
To me it seems possible, since the NFC reader has to do the reading and then I communicate with the reader through my Application. Since the reader supports Android Library, it should work. Please confirm.
Yes, this is possible. The ACR 122U download includes an Android SDK. I have published an Android util demonstrating some rudimentary functionality in Google play - ACR 122 USB NFC Reader Utils. I have also other apps for some of the other ACS readers, and a (paid) app aimed at developers doing proof of concept apps.

Reading EM4102 RFID tags on android

I'm exploring the possibilities of using the NFC Antenna on my Nexus 4 to read membership cards at work. The cards are an EM4102 RFID tag.
I found a small app called NFC Reader on the Android Market, but it doesn't react to the card, but it reads another tag (Mifare I think) perfectly fine.
Would this be a miss in the software, or is the antenna unable to read EM4102 tags?
I'm working on a small test app to see if I can get it working, but if anyone here has any experience with this, it'd be much appreciated!
I don't have experience with those tags, but a quick Google search suggests they are 125kHz technology. NFC only supports 13.56MHz technology.

Categories

Resources