From 6458e1019d6798f1e1328e5623a1d12bc52e5f28 Mon Sep 17 00:00:00 2001 From: vnapnic Date: Fri, 20 Nov 2020 22:37:57 +0700 Subject: [PATCH 1/7] remove flutter udid --- example/lib/main.dart | 6 ------ pubspec.yaml | 1 - 2 files changed, 7 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index 39373c0..bbd8a65 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -5,7 +5,6 @@ import 'dart:io'; import 'package:device_info/device_info.dart'; import 'package:flutter/material.dart'; import 'package:flutter_nearby_connections/flutter_nearby_connections.dart'; -import 'package:flutter_udid/flutter_udid.dart'; import 'package:fluttertoast/fluttertoast.dart'; void main() { @@ -106,10 +105,6 @@ Future _getId() async { } } -Future _getDeviceID() async { - return await FlutterUdid.udid; -} - class _DevicesListScreenState extends State { List devices = []; List connectedDevices = []; @@ -299,7 +294,6 @@ class _DevicesListScreenState extends State { } void init() async { - String deviceId = await _getId(); nearbyService = NearbyService(); await nearbyService.init( serviceType: 'mp-connection', diff --git a/pubspec.yaml b/pubspec.yaml index 189bb16..9345571 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -13,7 +13,6 @@ dependencies: sdk: flutter pedantic: ^1.9.0 fluttertoast: ^7.1.1 - flutter_udid: ^1.0.1 dev_dependencies: flutter_test: From 778c1e842840c096a74f3aad494a5206ef1d8de5 Mon Sep 17 00:00:00 2001 From: vnapnic Date: Fri, 20 Nov 2020 22:39:05 +0700 Subject: [PATCH 2/7] increase version to 1.0.5 --- CHANGELOG.md | 4 ++++ pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7de7416..5fdfd68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.5 + +* remove deviceID, fix connect IOS + ## 1.0.4 * Fix Android connected unstable diff --git a/pubspec.yaml b/pubspec.yaml index 9345571..879887b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_nearby_connections description: Flutter plugin supports peer-to-peer connectivity and discovers nearby devices for Android and IOS -version: 1.0.4 +version: 1.0.5 author: vn.apnic@gmail.com homepage: https://github.com/VNAPNIC/flutter_nearby_connections From ce16ee8ac412814e1e2bcc70bd115f8053e2dd9b Mon Sep 17 00:00:00 2001 From: vnapnic Date: Mon, 23 Nov 2020 18:08:37 +0700 Subject: [PATCH 3/7] fix android remove deviceID --- .../FlutterNearbyConnectionsPlugin.kt | 2 -- 1 file changed, 2 deletions(-) diff --git a/android/src/main/kotlin/com/nankai/flutter_nearby_connections/FlutterNearbyConnectionsPlugin.kt b/android/src/main/kotlin/com/nankai/flutter_nearby_connections/FlutterNearbyConnectionsPlugin.kt index 36403bf..a5aa4f6 100644 --- a/android/src/main/kotlin/com/nankai/flutter_nearby_connections/FlutterNearbyConnectionsPlugin.kt +++ b/android/src/main/kotlin/com/nankai/flutter_nearby_connections/FlutterNearbyConnectionsPlugin.kt @@ -51,7 +51,6 @@ class FlutterNearbyConnectionsPlugin : FlutterPlugin, MethodCallHandler, Activit private lateinit var callbackUtils: CallbackUtils private var mService: NearbyService? = null - private lateinit var localDeviceId: String private lateinit var localDeviceName: String private lateinit var strategy: Strategy private lateinit var connectionsClient: ConnectionsClient @@ -85,7 +84,6 @@ class FlutterNearbyConnectionsPlugin : FlutterPlugin, MethodCallHandler, Activit val intent = Intent(activity, NearbyService::class.java) activity.bindService(intent, connection, Context.BIND_AUTO_CREATE) - localDeviceId = call.argument("deviceId")!! localDeviceName = if (call.argument("deviceName").isNullOrEmpty()) Build.MANUFACTURER + " " + Build.MODEL else From b256941fbdec515dbc372d2554b927763839b13d Mon Sep 17 00:00:00 2001 From: vnapnic Date: Mon, 23 Nov 2020 18:11:20 +0700 Subject: [PATCH 4/7] increase version to 1.0.6 --- CHANGELOG.md | 4 ++++ pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fdfd68..ee93de8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.6 + +* remove deviceID, fix connect Android + ## 1.0.5 * remove deviceID, fix connect IOS diff --git a/pubspec.yaml b/pubspec.yaml index 879887b..0c03127 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_nearby_connections description: Flutter plugin supports peer-to-peer connectivity and discovers nearby devices for Android and IOS -version: 1.0.5 +version: 1.0.6 author: vn.apnic@gmail.com homepage: https://github.com/VNAPNIC/flutter_nearby_connections From 853f54973e504fc337ee39a081dcd9516ed33945 Mon Sep 17 00:00:00 2001 From: Nankai Date: Tue, 24 Nov 2020 12:37:38 +0700 Subject: [PATCH 5/7] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1178514..8917b3c 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ flutter nearby connections #### Plugin: [https://pub.dev/packages/flutter_nearby_connections](https://pub.dev/packages/flutter_nearby_connections) ### Flutter plugin supports peer-to-peer connectivity and discovers nearby devices for Android and IOS +#### Android doesn't support emulator only support real devices The flutter_nearby_connections plugin supports the discovery of services provided by nearby devices. Moreover, the flutter_nearby_connections plugin also supports communicating with those services through message-based data, streaming data, and resources (such as files). The framework uses infrastructure Wi-Fi networks, peer-to-peer Wi-Fi and Bluetooth Personal Area Networks (PAN) for the underlying transport over UDP. The project is based on [Nearby Connections API](https://developers.google.com/nearby/connections/overview) and [Multipeer Connectivity](https://developer.apple.com/documentation/multipeerconnectivity). From b8ad9fbbfc33cf770eaa00a8a7fa686526b83562 Mon Sep 17 00:00:00 2001 From: vnapnic Date: Tue, 24 Nov 2020 13:47:09 +0700 Subject: [PATCH 6/7] upgrade readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 8917b3c..148ef26 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,9 @@ flutter nearby connections #### Plugin: [https://pub.dev/packages/flutter_nearby_connections](https://pub.dev/packages/flutter_nearby_connections) ### Flutter plugin supports peer-to-peer connectivity and discovers nearby devices for Android and IOS + #### Android doesn't support emulator only support real devices + The flutter_nearby_connections plugin supports the discovery of services provided by nearby devices. Moreover, the flutter_nearby_connections plugin also supports communicating with those services through message-based data, streaming data, and resources (such as files). The framework uses infrastructure Wi-Fi networks, peer-to-peer Wi-Fi and Bluetooth Personal Area Networks (PAN) for the underlying transport over UDP. The project is based on [Nearby Connections API](https://developers.google.com/nearby/connections/overview) and [Multipeer Connectivity](https://developer.apple.com/documentation/multipeerconnectivity). From 11bc1b5c9115b7bf255913365121fcb046b55006 Mon Sep 17 00:00:00 2001 From: vnapnic Date: Tue, 24 Nov 2020 13:53:12 +0700 Subject: [PATCH 7/7] increase version to 1.0.7 --- CHANGELOG.md | 4 ++++ pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee93de8..ba3afc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.7 + +* update readme + ## 1.0.6 * remove deviceID, fix connect Android diff --git a/pubspec.yaml b/pubspec.yaml index 0c03127..c6fc12d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_nearby_connections description: Flutter plugin supports peer-to-peer connectivity and discovers nearby devices for Android and IOS -version: 1.0.6 +version: 1.0.7 author: vn.apnic@gmail.com homepage: https://github.com/VNAPNIC/flutter_nearby_connections