QHostInfo::lookupHost() and QDnsLookup::lookup() not Supported on Android

  • I have a mobile app that connects to a device via Wi-Fi. I look up the device's IP address using QHostInfo, using the device's dns name 'mydevicename.local'.

    I get the resolved IP address on iOS, but not Android. On Android I get a "Host not found" error msg.

    I have also tried using QDnsLookup, where on Android I get "Not yet supported on Android" error message.

    So what to do? Are there alternatives available in Qt? Can I JNI into native Android Java to use services available there? Anyone have any examples?

    Much thanks for any pointers!

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.