- From: François Beaufort via GitHub <sysbot+gh@w3.org>
- Date: Mon, 20 Feb 2023 10:45:01 +0000
- To: public-web-nfc@w3.org
Thank you! Now, where's the value you're trying to read? It looks like you only have one NDED record for now. If you wanted to write an hexadecimal value for instance, you could do something like below: ```js const ndef = new NDEFReader(); await ndef.write(0x1234); ``` And for reading it, you could do: ```js const textDecoder = new TextDecoder(record.encoding); const text = textDecoder.decode(record.data); console.log(text.toString(16)); // 1234 } ``` FYI https://developer.chrome.com/articles/nfc/#read-and-write-a-text-record contains plenty of code examples. -- GitHub Notification of comment by beaufortfrancois Please view or discuss this issue at https://github.com/w3c/web-nfc/issues/653#issuecomment-1436730938 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 20 February 2023 10:45:03 UTC