Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writing NFC Tag didn't succeeded every time in Quasar Cordova mobile App #469

Open
larasoft-io opened this issue Apr 30, 2022 · 0 comments

Comments

@larasoft-io
Copy link

I am developing a Quasar (Vuejs) Cordova mobile App and a feature that writes NFC tag. But the problem is it sometimes write on NFC tag successfully and sometimes do not.

Following is the function I am trying to use to scan NFC tag:

function onNfc(nfcEvent){

    var message = [
      **ndef.textRecord(444)**
    ];

    nfc.write(
      message,
      success => {
          alert('NFC Tag successfully encoded');
          nfc.removeNdefListener(onNfc)
          nfc.close();
      },
      error => {
        console.log(error);
      },
    );
    nfc.addNdefListener(onNfc, success => {console.log('here')}, error => {alert(error)})
  }

Please check attached screenshot below in which you can see the scanned data. It is the case when this plugin is unable to write 444 successfully.

WhatsApp_Image_2022-04-29_at_4 05 49_PM jpeg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant