I am currently working on writing and reading NFC tags using the ProximityDevice class on Windows Phone 8.1. Here is the code snippet I'm using to write the tag...
var dataWriter = new Windows.Storage.Streams.DataWriter();
dataWriter.unicodeEncoding = Windows.Storage.Streams.UnicodeEncoding.utf16LE;
dataWriter.writeString("test");
var pubId = proximityDevice.publishBinaryMessage
"Windows:WriteTag.Sample",
dataWriter.detachBuffer(),
proximityWriteTagMessageTransmitCallback);
Despite a seemingly successful write operation, when I attempt to read the tag back, I only receive the first character of the string (in this case "t"). Upon further inspection using NFC Interactor, it indicates that the writable size of the tag is 137 bytes, while the message size is 17 bytes, so there should be enough space for the complete data.
I have also tested the tags using NFC Launch it and everything worked correctly. I'm unsure of where the issue lies in my implementation. Any assistance or insights would be highly appreciated.
Thank you in advance.