Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Read data from NFC type V

$
0
0

@boutsikas4 wrote:

Hello,

i need to read data from a device and when i run the code from NFC example :

import { NFC, Ndef } from '@ionic-native/nfc';

constructor(private nfc: NFC, private ndef: Ndef) { }

...

this.nfc.addNdefListener(() => {
  console.log('successfully attached ndef listener');
}, (err) => {
  console.log('error attaching ndef listener', err);
}).subscribe((event) => {
  console.log('received ndef message. the tag contains: ', event.tag);
  console.log('decoded tag id', this.nfc.bytesToHexString(event.tag.id));

  let message = this.ndef.textRecord('Hello world');
  this.nfc.share([message]).then(onSuccess).catch(onError);
});

i get only the id and the techTypes: NfcV and NfcFormattable.

How do i read he data from the device ?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>