- From: Sven Haiges <sven.haiges@pm.me>
- Date: Mon, 26 Jul 2021 14:49:43 +0000
- To: "public-web-nfc@w3.org" <public-web-nfc@w3.org>
Received on Tuesday, 27 July 2021 08:01:39 UTC
Hi there,
I've been playing with web nfc on android/chrome and text/url records work fine to write and read. But I am in trouble when it comes to writing an Android App Record:
document.getElementById("writeApp").addEventListener("click", async () => {
log("writeAppLog", "User clicked write button");
const ndef = new NDEFReader();
try {
const aarRecord = {
recordType: "android.com:pkg",
data: encoder.encode("de.rki.coronawarnapp")
};
await ndef.write({
records: [aarRecord]
});
log("writeAppLog", "> App Message written");
} catch {
log("writeAppLog", "Argh! " + error);
}
});
It will not write it. Bug or intentional? Took the sample from this page: https://web.dev/nfc/ (very end, App Records).
thx a lot!
Sven
Sent with [ProtonMail](https://protonmail.com/) Secure Email.
Received on Tuesday, 27 July 2021 08:01:39 UTC