not use webview for this.
the full error message you should have received says:
{console.log("Argh! Cannot read data from the NFC tag. Try another one?");controller.abort();reject();});ndef.addEventListener("reading",(data)=>{console.log(`> Serial Number: ${data.serialNumber}`);console.log(`> Records: (${data.message.records.length})`);controller.abort();resolve(data);});}catch(error){console.log("Argh! "+error);reject('Your browser does not support the web NFC APIs. This tool requires Chrome 89+ on Android.');}});}
Your browser does not support the web NFC APIs. This tool requires Chrome 89+ on Android.
you are probably better off just using the nfc example available here on the forum and reading the tags yourself. plus you don't have to be online to use it.
the site you went to only reads NDEF tags, so
@Erel's example is good-to-go right out of the box.
Its a website which I want to put in the playstore. So I use b4a and a webview.
I use the website also on a desktop computer.
I can open the website in "mobile design" in the android browser on the phone. All works fine.
But in a WEBVIEW of b4x , only the permission for NFC dont work.
I am using NDEFReader javascript API on my website.
First I check if the device is able for NFC. Here I get an OK from the NDEFReader API.
If I try to scan : Argh! NotAllowedError: Failed to execute 'scan' on 'NDEFReader' : NFC permission request denied.
The error is similar to yours.
So what you are saying is, if you open a webview with a webchromeclient, it dont has the same features like the installed chrome browser on android?
So what means webchromeclient ? What version supports what ?
rgs
J.