Closed julianLight closed 8 months ago
Ran some tests today on my Google Pixel 7 on the master branch and found no problem so far. Could you please try it ?
In your pubspec.yaml
:
dependency_overrides:
bonsoir:
git:
url: https://github.com/Skyost/Bonsoir.git
ref: master
path: bonsoir
bonsoir_android:
git:
url: https://github.com/Skyost/Bonsoir.git
ref: master
path: bonsoir_android
bonsoir_darwin:
git:
url: https://github.com/Skyost/Bonsoir.git
ref: master
path: bonsoir_darwin
bonsoir_platform_interface:
git:
url: https://github.com/Skyost/Bonsoir.git
ref: master
path: bonsoir_platform_interface
Marked as completed for now. Try with 4.0.0 and tell me if it works for you.
I finally found the problem that I use domain name with a capital character. I surprised it work on most phone but some just cannot. However after I changed them to lower case, it works on all devices. Thank you for reply.
Describe the bug Pixel 7 Pro never found bonjour service.
Smartphone (please complete the following information):
Additional context There is sample code in my app.
BonsoirDiscovery _discovery = BonsoirDiscovery(type: "_dp_Example._tcp."); await _discovery.ready; await _discovery.start(); _discovery.eventStream?.listen((BonsoirDiscoveryEvent event) async { debugPrint('bonjour. type: ${event.type}, service: ${event.service}, isResolved: ${event.isServiceResolved}.'); if (event.type == BonsoirDiscoveryEventType.discoveryServiceResolved) { final service = event.service; _action(service); } }, onError: (e) { debugPrint(e.toString()); });
The debugPrint only print: bonjour. type: BonsoirDiscoveryEventType.discoveryStarted, service: null, isResolved: false. Even other devices can correctly catch right services.