Is it possible to perform multiple transactions with an NFC tag or device? (i.e. read more than once)

StackOverflow https://stackoverflow.com/questions/16674909

  •  30-05-2022
  •  | 
  •  

Question

According to this Nokia developer's page, you can read an NFC tag with the SubscribeForMessage method: http://www.developer.nokia.com/Community/Wiki/Use_NFC_tags_with_Windows_Phone_8

There is a 'tip' below the read tag code:

Warning: To receive a message, you must perform your subscription before the ProximityDevice.DeviceArrived event is fired, or user must remove the tag and repeat the operation.

Does this mean that you cannot read from an NFC device more than once with Windows Phone 8?

As mentioned here in the Android API, some NFC devices can be used for e.g. key generation, so it can be useful to make several reads and writes to a card.

Was it helpful?

Solution

As far as I can tell, Windows Phone 8 only supports NFC Forum formatted tags, i.e. tags that contain an NDEF message. The OS will read the NDEF message from the tag automatically and dispatch it to your app.

This is all done as part of the Proximity API, which is technology-agnostic and as such hides the NFC communication from the app. The communication with a proximity device may as well take place over Bluetooth or WiFi; the app does not know (cannot even know) and does not have to care about this. So there is no way to set up any connection with an NFC tag like you can do in Android.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top