How can i test Android HCE on my Laptop using ADT? - android

is there a way to simulate an NFC transaction using HCE (Host Card Emulation) on Android 4.4 within my ADT IDE using an emulator?...are there such emulators available that support HCE?
Basically what i am trying to do is to develop an app without having to actually purchase an Android 4.4 device ? what are the options available?..any thoughts/ideas/suggestions?
Thanks in advance.

NFC is hardware specific so I believe that using just an emulator is not possible. Moreover, not all Android 4.4 devices support HCE.
In addition, if you want to simulate a transaction you will need to have a POS that sends APDU commands to your HCE service.

Related

Android NFC with USB-NFC-Reader

I have an Android tablet with Android 4.2. This tablet does not have NFC hardware. However I have an external USB reader: ACR 1252U, that came with an Android library. This library unfortunately only gives me basic functionality - read and write Tags. Altough this is working quite well, it is not enough...
Because for my application I need to transfer files from my Android 4.2 tablet to other NFC devices (Android smartphones). So I need to put the NFC reader into peer-to-peer mode - which it supports. But how can I achive this with my setup? There indeed is an SDK for that reader, but it's Windows only.
Is it somehow possible, to use the built-in NFC-functions from Android with the external USB reader?
Is there another library for this reader, that supports peer-to-peer communication with other NFC-devices?
Is there another Hardware that I can use, to make this work?
Edit:
The linked question does NOT solve my problem:
It is 3.5 years old. On might think, that in meantime has changed a lot.
The answer to that question (= use the Android ACS library), is part of my own question... So it can't be the answer.
Is it somehow possible, to use the built-in NFC-functions from Android with the external USB reader?
No, that's not possible. If your Android devices did not ship with NFC, there simply is no built-in NFC functionality (not even on the software side). The Android NFC API is essentially an empty stub implementation that does nothing on such a device.
Is there another library for this reader, that supports peer-to-peer communication with other NFC-devices?
The library from ACS does not prevent you from accessing the reader's peer-to-peer capabilities, so I don't see why you would want to use a different library. See section 5.9 of the API specification on how to use the reader's peer-to-peer capabilities.
I need to transfer files from my Android 4.2 tablet to other Android NFC devices
Based on that request I assume that you want to use something like Android Beam to establish some fast out-of-band channel over NFC and then transfer the (large?) files over that out-of-band channel (e.g. WiFi or Bluetooth).
In that case, you would need to re-implement the Android Beam stack (NFC peer-to-peer mode + LLCP + Simple NDEF Exchange Protocol + establishing out-of-band communication channel + transfering file over that channel)

Testing Android Beam in Simultator

I am trying to do Android Beam in Android, I don't have two real device that support NFC. So Is it possible to do this in GenyMotion or anything.
Any suggestion ??

Data transfer betweeen two nfc capable devices without using android beam

I am developing an app with which I transfer a vcard between two nfc capable devices. I am able to do it if both the devices have android beam. I want to know if it is possible to transfer information from an ICS device(Having android beam) to a gingerbread device(which does not have android beam)...Thanks in advance..
Android supports two modes for operating with NFC:
P2P -> Android Beam //
Tag Reader -> "Advanced NFC Framework"
If i'm not wrong, Android Beak is supported in Gingerbread too, so you shoudn't have to face any problem exchanging data between two Android NFC devices with Beam.
The second way, is only for making operations with Tags. Android does not support card emulation officially so this is not an option for you.
Hope this helps you.

Is it possible to use Android Beam between an android device and another NFC device?

I'd like to implement a NFC communication between my Android app and a NFC-enabled kiosk. I've read the documentation and I understand pushing data can be done in 2 ways:
Via foreground NDEF pushing for API level 10 to 13
Via Android Beam from API level 14
I think I can do what I want to via the first solution but I'd like to know if it's possible to use Android Beam between an android device and a non-android device?
Thanks for your help,
Romain
Although the function calls between API 10 to 13 and APi 14 differ, the actual underlying protocol is nearly the same. In both cases, NFC peer-to-peer communication is done using LLCP. In API 10 to 13, the actual data transfer protocol used is NPP. In API 14, SNEP is added to that, but it will fall back to NPP when the other device does not support SNEP.
So when your non-Android device implements SNEP and/or NPP over LLCP, it can transfer data to and receive data from an Android NFC device. Several implementations of SNEP and LLCP for card reader devices exist, see for example https://github.com/grundid/nfctools.
I looked in to this for a college project.
First please not that there are 3 modes of NFC operation { Card read/write, tag emulation and P2P communication }. Android supports Card read/write and P2P communication.
To communicate with a non Android device via P2P is quite complex as you must use the NPP (Ndef Push Protocol) built on LLCP (logical link control protocol). Your non android platform will need to implement the LLCP to be able to communicate. I'm not sure if this has been done for NFC yet. Information on the NPP/LLCP implementation can be found here
The next approach is to use card read/write mode to communicate with the non Android device running in card emulation mode. This way you can send APDU's to the emulated tag to send and receive data. I did this approach in reverse using BlackBerry for my project. BlackBerry supports card emulation so I used the non Android device (ACR122U) to send APDU's to the BlackBerry.
While the first approach (P2P) is obviously the ideal way to go, the second one could be easier to implement. It worked quite well for me in my application anyway, I created a system that accepts payments via NFC.
Please note that the ACR122U doesn't have good support for NFC Tag Emulation so it is not suitable for you. The LibNFC website is a great start to find a device that supports tag emulation.
I am now finished the project and it works great using the ACR122U device. If you need any help on the second approach please ask.
See belows
Issue 28014: Enable real NFC p2p communication and the option to disable the "Touch to Beam" UI
https://code.google.com/p/android/issues/detail?id=28014
Android Peer to Peer dose not work at all.

Has anyone been able to communicate between BlackBerry and Android phones via NFC?

I have been trying to do some basic communications between a BlackBerry and a Android NFC enabled phone. The BlackBerry is a Bold 9930 with 7.1 on it, and the Android is a Nexus S with 2.3.6 on it. I have the BlackBerry set up to emulate a tag and am trying to get the Android phone to recognize it. I have a NXP test board set up and it can read the BB emulated tag's ID, but the Android won't recognize it. Has anyone been able to do this successfully?
Yes, I just used the Smart Tags app on a BlackBerry 9360 with OS7.0 to create a Smart Poster tag and place it in tag emulation mode. Then held it to the back of a Nexus S running NXPs tag writer app, and it recognised and read the BB emulated tag. Likewise the tag was read on the Nexus S by the NFC TagInfo app by Michael Roland at NFC Research Lab.
You have a good example at blackberry doc. You can share a NDEF message to the Android phone. Is a simple example but the communication is possible.

Categories

Resources