Open farry19 opened 3 years ago
Hi @farry19 because this repo is an app, currently we don't have any plan to provide documentation.
Regarding vCard
, you can try this code snippet:
async function writeVCard(value) {
await NfcManager.requestTechnology(NfcTech.Ndef, {
alertMessage: 'Ready to write some NDEF',
});
const {name, tel, org, email} = value;
const vCard = `BEGIN:VCARD\nVERSION:2.1\nN:;${name}\nORG: ${org}\nTEL;HOME:${tel}\nEMAIL:${email}\nEND:VCARD`;
const bytes = Ndef.encodeMessage([
Ndef.record(Ndef.TNF_MIME_MEDIA, 'text/vcard', [], vCard),
]);
await NfcManager.ndefHandler.writeNdefMessage(bytes);
NfcManager.cancelTechnologyRequest();
}
Hope that helps!
hi , i want to try this app and clone it , so i have a mifare card, when i try to write a text or mail there is an error pop up like "NFC Error Error: unsupported tag api" why do i get this ? is something wrong about my card?
Can you provide the full documentation of the package, as i have gone through the samples but didn't understand how to write custom tags. e.g. vCard or other. Thanks