[web-nfc] Handling non-formatted tags (#367)

zolkis has just created a new issue for https://github.com/w3c/web-nfc:

== Handling non-formatted tags ==
See also this [discussion](https://chromium-review.googlesource.com/c/chromium/src/+/1852215/1/services/device/nfc/android/java/src/org/chromium/device/nfc/NdefMessageValidator.java#47).

> Originally Web NFC was not meant to be a low-level NFC API and currently we don't explicitly handle unformatted/formatting use cases. 
I agree that presenting a non-formatted tag as an empty NDEF tag may be confusing if someone expects low-level NFC behavior from this API (there was a shift from high-level to lower-level recently, but not consistent). 
In that case we could take away that Note (from section 10.12.10, https://w3c.github.io/web-nfc/#the-nfc-reading-algorithm).

If we remove that Note, then a non-formatted tag will not produce any effect, i.e. no content should be presented, and no empty records should be presented (since there is nothing to read). 

However, whether writes are expected to succeed on non-formatted but NDEF-formatable tags, is a policy and the Web NFC API does not require enforcing that policy, in order that implementations could adapt to the underlying platform policies about this. Formally, implementations have freedom to decide about that, since they can abort a write for whatever reason in step 11.1 of the push algorithm: https://w3c.github.io/web-nfc/#the-push-method. Non-formatted tag MAY be one of them.


Please view or discuss this issue at https://github.com/w3c/web-nfc/issues/367 using your GitHub account

Received on Thursday, 10 October 2019 16:25:26 UTC