From 9e8addde36f47e4641261d2302148235c965c465 Mon Sep 17 00:00:00 2001 From: Jonathan Bagg Date: Mon, 22 May 2023 16:03:56 -0400 Subject: [PATCH] README.md - add Android NDS note --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 33557c4..e959c78 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ QZeroConf is a Qt wrapper class for ZeroConf libraries across various platforms. * Android * iOS -QZeroConf wraps avahi-client on Linux, avahi-core on Android, and dnssd on Mac, iOS and Windows. +QZeroConf wraps avahi-client on Linux, Network Discovery Service (java) on Android, and dnssd on Mac, iOS and Windows. ### Building @@ -37,6 +37,15 @@ The default is `OFF`. You can also build the included example project by setting `BUILD_EXAMPLE` to `ON`. The default for this is `OFF` +#### Android + +Prior to Android api 30, QtZeroConf used AvaliCore. AvaliCore no longer works >= api 30 as bind() to netlink sockets was disabled in Android. QtZeroConf now uses the Android java Network Discovery Services. NDS is slightly buggy, but more or less gets the job done. A common issue with NDS is that if the app is in sleep mode and a service is removed on another device, the app does not get notified the service was removed when it wakes back up. ANDROID_PACKAGE_SOURCE_DIR must be added to your app's .pro file. + +``` +ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android +``` +QZeroConfNsdManager.java must then be copied or linked to $$PWD/android/src/QZeroConfNsdManager.java Notice the extra src/ ...gradle expects this. + ### API #### Service Publishing