RE: [web-nfc] Unable to transfer data between peer-devices

Web NFC is behind a flag in Chrome. Given that shipping such features in chrome takes a lot of work and reviews, we are postponing doing that until we have landed the Generic Sensor API, which should be happening soon.

The more use-cases and interest you can show for us shipping this, the easier it will be.

Please test out the implementation behind the flag (about:flags to turn it on)

Cheers
Kenneth

From: Mark James [mailto:mrj@rbate.com]
Sent: Friday, March 16, 2018 12:17 PM
To: public-web-nfc@w3.org
Subject: Re: [web-nfc] Unable to transfer data between peer-devices

On 03/01/18 03:52, Jan von der Assen via GitHub wrote:
@MartinBeekhuizen If you need a workaround to transfer data between peer devices from the browser, you could leverage the [Web Share API](https://developers.google.com/web/updates/2016/09/navigator-share), to pass the data over Android Beam. Depending on the data you are trying to send, this might not be a solution for you; in my case this worked perfectly since i tried to send an URI, which should be opened in the target's Browser.

Thank you for pointing me to the Web Share API as temporary solution to peer-to-peer URL sharing via NFC until WebNFC support is implemented and released in the mainline Chrome Android browser.

On my Android 6 phone, the only NFC target brought up by the Web Share API is Android Beam. However choosing that ignores the URL set in the share call, instead sharing the URL of the invoking webpage.

In my application I always want to share by NFC, so even if the Android Beam option worked, it would still mean that users have to make an unnecessary extra touch. The Web Share API also has restrictions such as requiring the sending browser to be on an SSL page unless a custom Chrome build is used, which is annoying for development, and the share must directly triggered by a user action.

I'd appreciate a summary of when WebNFC with peer-to-peer URL-sharing support will be widely available. My standard distribution of Chrome 65 for Android doesn't define navigator.nfc, so it looks like the whole API is still in beta.

Mark

Received on Friday, 16 March 2018 11:46:41 UTC