Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. NFC: Unable to detect
Forum Updated to NodeBB v4.3 + New Features

NFC: Unable to detect

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
4 Posts 2 Posters 904 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RohitIti
    wrote on last edited by RohitIti
    #1

    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

    1 Reply Last reply
    0
    • jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • R Offline
        R Offline
        RohitIti
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0
        • jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

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

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved