[web-nfc] onreading event does not fire in Android 6, although it is OK on Android 8 (#330)

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

== onreading event does not fire in Android 6, although it is OK on Android 8 ==
With the javascript below in a web page using Canary 78.0.3900.0, I am finding that on an Android 8 device, the onreading event is firing as expected when a card is placed near the reader.

However, the same code with the same browser version on a Nexus 7, Android 6.0.1 device does NOT produce the onreading event, even though the 'detected' audio is being played (provided Android Beam is 'off')

function readTagId(){
//const writer = new NFCWriter();
const reader = new NFCReader();
 reader.onreading = nfcRead;
 reader.onerror = nfcError;
 reader.scan({compatibility: "any"});
}

function nfcRead(event){
 document.getElementById('datacap').style.visibility='visible';
 document.getElementById('tagId').value = event.serialNumber;
}

function nfcError(er){
 alert("oops...");
 alert(er);
}

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

Received on Monday, 2 September 2019 11:46:19 UTC