Ionic v2 nfc not consoled


#1

hi ,
this is my code :slight_smile:
import { Component } from ‘@angular/core’;
import { NavController, NavParams,LoadingController,AlertController,Platform} from ‘ionic-angular’;
import {MaintenanceHomePage} from ‘…/pages’;
import {NFC, Ndef,} from ‘ionic-native’;
import * as _ from ‘lodash’;

@Component({
selector: ‘page-maintenance-login’,
templateUrl: ‘maintenance-login.html’
})
export class MaintenanceLoginPage {

constructor(public navCtrl: NavController, public navParams: NavParams,private mazorMaintenanceApi:
private loadingController: LoadingController,public alertCtrl: AlertController,private platform: Platform) {

}

ionViewDidLoad() {

   this.platform.ready().then(() => {

    NFC.addTagDiscoveredListener('text/pg').subscribe(res => {
      console.log("res " + res);
    },(err) => console.log(err));

    NFC.addMimeTypeListener().subscribe(res => {
     console.log("res " + res);
    },(err) => console.log(err));

    NFC.addNdefListener().subscribe(nfcData => {
       console.log("res " + res);
       });

    });   

}
}

when I bring nfc card I hear the sound but i don’t see any console log with the nfc detail …
please advice ,
many thanks ,
Eran.