Android App Records

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