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. DNS lookup not supported on Android?
Forum Updated to NodeBB v4.3 + New Features

DNS lookup not supported on Android?

Scheduled Pinned Locked Moved Solved Mobile and Embedded
6 Posts 2 Posters 674 Views 2 Watching
  • 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.
  • M Offline
    M Offline
    Michel de Boer
    wrote on last edited by
    #1

    I am trying to do a lookup of TXT records in DNS using QDnsLookup in Qt6.8.2
    On Linux my code works fine, but on Android I get an error: Not yet supported on this OS

    Why is that?
    Is it really not supported??

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

      Hi,

      From a look at the concerned code, it's indeed not yet supported on Android.
      As for why, I don't know.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Michel de Boer
        wrote on last edited by
        #3

        I delved a bit in the Android API and found that the DnsResolver in Android only supports A and AAAA records. Perhaps that is why.
        As a work around, probably permanent solution, I am now using DNS over HTTP.

        1 Reply Last reply
        1
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Do you mean the Java API or the native API ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • M Offline
            M Offline
            Michel de Boer
            wrote on last edited by
            #5

            The Java API
            https://developer.android.com/reference/android/net/DnsResolver

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              AFAIK, Qt would use the C++ api for that task.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • M Michel de Boer has marked this topic as solved on

              • Login

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