0

I have created a winform app on c#. I want this app to read/write NFC tags and display the content on the form. Is it possible? Or will I have to build the app on JAVA? I am confused. Please suggest. I do not have a proper NFC reader and want my Nexus to act like a reader and writer here. I understand I will have to create another application for my Nexus which sends an acknowledgement to the desktop application. Is that correct? That will mean that the desktop app (C#) will need to talk to Android app (JAVA)? OS: Windows 8.1 Platform: C#.Net

Please ask me for any more information on this if you think this data is insufficient to answer. Thanks!

CSA
  • 9
  • 5

1 Answers1

2

Yes you can absolutely do that as long as your device has the NFC hardware. (I believe the Nexus 7 does)

What you may want to do is to send and receive NFC data in the form of NDEF messages.

You need to add manifest permissions:

<uses-permission android:name="android.permission.NFC" />

The Android operating system can help you to handle NFC data:

Android provides a special tag dispatch system that analyzes scanned NFC tags, parses them, and tries to locate applications that are interested in the scanned data. It does this by:

  1. Parsing the NFC tag and figuring out the MIME type or a URI that identifies the data payload in the tag.
  2. Encapsulating the MIME type or URI and the payload into an intent. These first two steps are described in How NFC tags are mapped to MIME types and URIs.
  3. Starts an activity based on the intent. This is described in How NFC Tags are Dispatched to Applications.

See documentation.

erad
  • 1,766
  • 2
  • 17
  • 26
  • It's a Nexus 7 (the tablet) rather than nexus 5, but the Nexus 7 does indeed have NFC. – RossC Sep 24 '14 at 10:34
  • Thanks! Will I have to create another application for my Nexus which can send me an acknowledgement on the latop about the tag being written or how is it done? – CSA Sep 24 '14 at 10:36
  • You can integrate such functionality into an existing app you are working on. But if you don't have anything, yes, you might need to make an app. – erad Sep 24 '14 at 10:37
  • Have reworded the question. Please have a look at it again. – CSA Oct 02 '14 at 11:17