Plugin.NFC icon indicating copy to clipboard operation
Plugin.NFC copied to clipboard

Write VCARD data

Open bptf opened this issue 1 year ago • 1 comments

Which NFCNdefTypeFormat can be used to write VCARD data to an NFC card?

Ex data:

BEGIN:VCARD
VERSION:3.0
FN;CHARSET=UTF-8:Name
...
CATEGORIES:BUSINESS,WORK
REV:2022-05-31T20:08:12.016Z
END:VCARD

Thanks!

bptf avatar Feb 06 '24 05:02 bptf

I was thinking NFCNdefTypeFormat.Mime but I am not sure. In NFC Tools app, the field has Content-type: text/vCard. So something like this?

new NFCNdefRecord
{
    TypeFormat = NFCNdefTypeFormat.Mime,
    MimeType = "Content-type: text/vCard",
    Payload = NFCUtils.EncodeToByteArray(data)
}

Or do I need to use NFCNdefTypeFormat.WellKnown, and if so how do I assign the Content-type?

bptf avatar Feb 06 '24 05:02 bptf