Skip to content

Commit

Permalink
README.md - add Android NDS note
Browse files Browse the repository at this point in the history
  • Loading branch information
jbagg committed May 22, 2023
1 parent 65e0713 commit 9e8addd
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9e8addd

Please sign in to comment.