Skip to content Skip to sidebar Skip to footer

Transfer Data To Pc From Android Device Via Nfc

I am trying to develop an Android application for a hospital. In this system there is a need to get the patient information stored in the database in the android phone into the des

Solution 1:

Depending on what NFC devices you want to use in combination with the ACR122U NFC reader you multiple options:

  • If you only need to exchange a single message (data packet) in a single direction, you could use peer-to-peer mode. However, the peer-to-peer protocol stack is relatively complex (in comparison to the other alternatives). Moreover, Android's built in Beam functionality will request user confirmation (Beam UI) for every message transfer.

  • If you only need to support Android devices with Android 4.4 or later (and even then not all Android NFC devices are supported, see this), you could use the ACR122U in reader/writer mode. In reader/writer mode, the ACR122U can communicate with contactless smartcards. See the reader's manual on how to access such ISO/IEC 14443-4 contactless smartcards. On the Android side, you would use the host-based card emulation (HCE) mode. See the Android documentation on how that works on Android 4.4 and later.

  • In my opinion the best option would be to use the ACR122U in card emulation mode. In card emulation mode the ACR122U can be used to emulate a tag/contactless smartcard that can be detected by an Android device just like any other NFC tag/contactless smartcard. You can find examples, for instance, with libnfc. Also see this answer on how to bring the ACR122U into card emulation mode. This option can be used across all Android versions (and on BlackBerry and with some additional effort to some extent even on Windows Phone). With this scenario, the phone would take the reader (interrogator) part in the communication and the ACR122U (and the connected PC) would be the card (controlled component). Using techniques like inverse reader mode you could reverse that relationship.

Solution 2:

You could use the host based card emulation for exchanging the data: http://developer.android.com/guide/topics/connectivity/nfc/hce.html Or alternatively the p2p communication: http://developer.android.com/guide/topics/connectivity/nfc/nfc.html#p2p

Post a Comment for "Transfer Data To Pc From Android Device Via Nfc"