Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write VCARD data #150

Open
bptf opened this issue Feb 6, 2024 · 1 comment
Open

Write VCARD data #150

bptf opened this issue Feb 6, 2024 · 1 comment

Comments

@bptf
Copy link

bptf commented Feb 6, 2024

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
Copy link
Author

bptf commented Feb 6, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant