diff --git a/example/lib/main.dart b/example/lib/main.dart index 3f3081c..132a8e3 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -93,18 +93,6 @@ class DevicesListScreen extends StatefulWidget { _DevicesListScreenState createState() => _DevicesListScreenState(); } -Future _getId() async { - var deviceInfo = DeviceInfoPlugin(); - if (Platform.isIOS) { - // import 'dart:io' - var iosDeviceInfo = await deviceInfo.iosInfo; - return iosDeviceInfo.identifierForVendor; // unique ID on iOS - } else { - var androidDeviceInfo = await deviceInfo.androidInfo; - return androidDeviceInfo.androidId; // unique ID on Android - } -} - class _DevicesListScreenState extends State { List devices = []; List connectedDevices = []; diff --git a/lib/src/nearby_service.dart b/lib/src/nearby_service.dart index 06d4132..c536334 100644 --- a/lib/src/nearby_service.dart +++ b/lib/src/nearby_service.dart @@ -39,10 +39,12 @@ class NearbyService { /// In iOS, the framework uses infrastructure Wi-Fi networks, peer-to-peer Wi-Fi, /// and Bluetooth personal area networks for the underlying transport. /// param [serviceType] max length 15 character, need to be defined in Info.plist + /// /// NSBonjourServices - // - // _[serviceType]._tcp - // + /// + /// _[serviceType]._tcp + /// + /// /// param [deviceId] is unique, you should use the UDID for [deviceId] /// param [strategy] Nearby Connections supports different Strategies for advertising and discovery. The best Strategy to use depends on the use case. only support android OS Future init({