Re: [web-nfc] NDEF Read triggered when writting an NDEF (#551)

Thank you @DonnaWuDongxia for working on this. 

> It seems like your implementation will leave "Android NFC Reader Mode" enabled after at least one successful write/scan Web NFC operation has been called. 

The question is indeed to know when to release the hook of NFC events. If you release it while the smartphone is still on the tag, the NFC service will process the NFC event (and we are back to the first problem).

> But shouldn't we at least disable it when tag goes out of range?

I doubt that you can be notified when the tag gets out of range.


Some thoughts:
We are trying here to find out when to release the NFC hook. What do you think of choosing the same strategy as the one chosen for Android API? I mean: Exposing enableforegrounddispatch() and disableforegrounddispatch() in webNFC API. By this way the application has the full control to decide when it wants to receive the NFC events or when it want to let the native execution run.


-- 
GitHub Notification of comment by OlivierGrenoble
Please view or discuss this issue at https://github.com/w3c/web-nfc/issues/551#issuecomment-605799466 using your GitHub account

Received on Monday, 30 March 2020 06:02:39 UTC