i am developing an application where users can transfer files from phone to desktop using NFC technology. As i found in this post there is an option to use ACR122U in reader/writer mode and Nexus 5 phone in HCE mode. Can anyone please suggest some samples of such application as it is difficult for me to understand how it works. Your help will be so appreciated, thanks in advance.
When you use HCE on your Nexus 5 the Nexus will emulate a NFC tag. The ACR122U can read this tag in reader/writer mode, so that makes the communication possible. Study this example, it will help you farther. For more general information about HCE on Android you can read this.
I have worked in this exact use case. I used P2P mode. I didn't have to treat one partner as a tag, infact data transfer worked both ways.
In my experiment- Smart phone side I tried Samsung S4, HTC One, Nexus 3, Nokia LUMIA etc.. worked like a charm. There is some limitation in the APDU/payload size. For Reader to Phone case. For your case P2P mode with attachments works fine.
I downloaded this NFC library and tweaked it to my needs. I used it in WP7 along with ACCR122U.
I wrote a simple Android app to receive/send data to ACCR122U.
if your ok to try P2P mode with SNEP as opposed to NPP, do let me know.I can help you.
Related
I would like to create a windows app that sends a URL or a small file via NFC (preferably) From windows to android and from windows to ios. Has anyone any info or code examples in C# (or other language) in windows that demonstrates how to do this.
Any help would be greatly appreciated.
I did look at something related, I investigated Sending small files from Android to Android via NFC but decided against it.
This is because in Android as of Android 10 that "Android Beam" has been deprecated this means that Android's ability to receive files has been removed. From experience on early version of Android I can see why they removed it as it was too reliable.
Update:
Additional info Android did use LLCP sockets to do peer to peer NFC transfer. the source code for how Android did one end of this is available at https://android.googlesource.com/platform/packages/apps/Nfc/+/refs/heads/master/src/com/android/nfc/ndefpush/NdefPushServer.java
I'm not sure if there was anything similar in iOS.
This leaves you the option of writing code on Windows that does Host Card Emulation(HCE) to emulate a card that carries a Standard NDEF message which can contain things like URL's or data of certain mime types.
Update:
I can say for Android that if the NDEF message contains a URL in the right form that the OS will Launch a Browser to load that URL automatically (If you have multiple Web browsers install it might ask the user which Web browser to use to do this). For iOS I don't know but expect the same behaviur
While I believe that HCE is possible to emulate an card with NDEF message on it I've not seen any code to do it.
does someone have experience with external devices or especially with Rfid readers? I ordered an external one and still couldn't test because I cannot connect it to my tablet (I would need an USB-A to USB-C converter) but it is necessary for me to know if it's possible or not. If it is not I won't waste my time and send the external reader back.
The reader has a Java development kit (It could theoretically be used in Nativescript but I don't know if NS works with external devices) and there are also some example applications but not based on NativeScript.
Thank you guys in advance.
NativeScript is nothing but a JavaScript Runtime, in a nutshell it allows you to write the same Java or Kotlin / Objective C code in JavaScript.
So if your RFID Reader supports a Java Interface, then it's very much possible to read from Android device so NativeScript too.
I am looking for some advice on scanning barcodes into our web app via post/get etc.
We would be looking to use some kind of handheld scanner with a mobile computer built in (windows or linux etc.) and wifi.
I have done some reading and found a few articles on using an iPhone but cant find anything explicitly using a standalone scanner, so would like to get some advice before we buy one and give it a go.
Has anyone done this before?
While not strictly a programming question, yes, we did that. We use a Honeywell Dolphin 75e device with Android, it has a superb scanning engine, to just do this: Scan data and transmit it via HTTPS.
I'm ignorant in android software- I want to communicate "Arduino" with mobile and send/resive byte in Bluetooth mode - I want to display this code in several page ,some time convert this byte to certain string and then display it
Have you seen the Arduino tutorial? Its really basic but is a working framework to help develop more complex android apps.
I am sitting here with an ACS contactless reader ACR122 which is a NFC-reader/terminal. From my android app I want to send data to this reader, by creating two separate applications, one for the laptop and one app for the phone. For the application which should run one the computer I've been using the javax.smartcardio library. So my question is: Can I interact this way? Cuz I read one different forums that android doesn't support the javax.smartcardio library, but I guess this is just for the android SDK, am I right?
Thanks in advance! :)
you can interact in a way you have mentioned. The ACR122 can communicate in a p2p mode with the Nexus S, but it will not be that easy, because you have to implement or port couple of things. Look e.g. here:
http://www.libnfc.org/community/topic/401/p2p-communication-between-android-phone-and-nfc-reader/
BR
Petr