Nominate our 2022 Qt Champions!

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);
    qDebug() << " Nfc is availiable";
    qDebug() << " Nfc is not availiable";

    manager->registerNdefMessageHandler(this, SLOT(handleNdefMessage(QNdefMessage,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

  • Lifetime Qt Champion

    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

  • Is it ?
    In that case what is the use of existing NFC . Is it only for symbian ?

  • Lifetime Qt Champion

    At least NFC is supported on Linux, not sure about iOS/Windows/Windows Phone.

Log in to reply