NFC: Unable to detect
-
Hello,
I have just started working on NFC. As i read through the whole document , i wrote the following code ,
manager = new QNearFieldManager(this);
if(manager->isAvailable())
qDebug() << " Nfc is availiable";
else
qDebug() << " Nfc is not availiable";manager->registerNdefMessageHandler(this, SLOT(handleNdefMessage(QNdefMessage,QNearFieldTarget*)));
connect(manager,SIGNAL(targetDetected(QNearFieldTarget*)),this,SLOT(nfcTargetDetected(QNearFieldTarget*)));
connect(manager,SIGNAL(targetLost(QNearFieldTarget*)),this, SLOT(nfcTargetLost(QNearFieldTarget*)));
qDebug() << manager->startTargetDetection();
I am receiving** Nfc is not availiable** , manager->startTargetDetection() is returning false and also when ever i touch any tags or any mobiles having nfc the** targetDetected signal is not emmiting.**
I have flashed this code in nexus 5 which i having NFC support and i used NFC tags and another Nexus 5 to test this.
i have added persmission inside androidmanifest.xml
<uses-permission android:name="android.permission.NFC"/>Can some one help me with this ?
Thank you
-
Well, if your receive "Nfc is not availiable" then the rest will not work as well.
As far as I know NFC will be supported on Android starting with Qt 5.6 -
At least NFC is supported on Linux, not sure about iOS/Windows/Windows Phone.