From 0f2a65151989628c47933227a9b227aa7af02731 Mon Sep 17 00:00:00 2001 From: Prerak Mann Date: Wed, 18 Dec 2019 17:07:33 +0530 Subject: [PATCH] prep for new release, v1.0.3 --- .gitignore | 3 ++ CHANGELOG.md | 6 ++++ README.md | 12 +++++--- example/pubspec.lock | 71 +++++++++++++++++++++++++++++++++++++------- pubspec.lock | 69 +++++++++++++++++++++++++++++++++++------- pubspec.yaml | 3 +- 6 files changed, 137 insertions(+), 27 deletions(-) diff --git a/.gitignore b/.gitignore index d71f6ea..f920894 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,6 @@ build/ .idea/ + +example/ios/Flutter/flutter_export_environment.sh +example/.flutter-plugins-dependencies diff --git a/CHANGELOG.md b/CHANGELOG.md index d8a5847..bf18f39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.0.3 + +* Added serviceId parameter in startAdvertising and startDiscovery +* Added new method askLocationAndExternalStoragePermission() +* Readme Fixes + ## 1.0.2+1 * Updated dartdoc and Readme diff --git a/README.md b/README.md index f930dcb..b99847e 100644 --- a/README.md +++ b/README.md @@ -45,9 +45,11 @@ bool a = await Nearby().checkLocationPermissions() Nearby().askLocationPermission() // OPTIONAL: if you need to transfer files and rename it on device -Nearby().checkExternalStoragePermission() +bool b = Nearby().checkExternalStoragePermission() // asks for READ + WRTIE EXTERNAL STORAGE permission only if its not given Nearby().askExternalStoragePermission() + +Nearby().askLocationAndExternalStoragePermission() // for all permissions in one go.. ``` ## Work Flow @@ -69,6 +71,7 @@ try { onDisconnected: (String id) { // Callled whenever a discoverer disconnects from advertiser }, + serviceId: "com.yourdomain.appname", // uniquely identifies your app ); } catch (exception) { // platform exceptions like unable to start bluetooth or insufficient permissions @@ -86,6 +89,7 @@ try { onEndpointLost: (String id) { //called when an advertiser is lost (only if we weren't connected to it ) }, + serviceId: "com.yourdomain.appname", // uniquely identifies your app ); } catch (e) { // platform exceptions like unable to start bluetooth or insufficient permissions @@ -123,10 +127,10 @@ try{ ```dart Nearby().acceptConnection( id, - onPayLoadRecieved: (endid,Uint8List bytes) { + onPayLoadRecieved: (endpointId, payload) { // called whenever a payload is recieved. }, - onPayloadTransferUpdate: (endid, payloadTransferUpdate) { + onPayloadTransferUpdate: (endpointId, payloadTransferUpdate) { // gives status of a payload // e.g success/failure/in_progress // bytes transferred and total bytes etc @@ -154,7 +158,7 @@ Nearby().sendFilePayload(endpointId, filePath); //Send filename as well so that receiver can rename the file Nearby().sendBytesPayload(endpointId,fileNameEncodedWithPayloadId); -//e.g send a string like "payloadId:FileExtensionOrName" as bytes +//e.g send a string like "payloadId:FileExtensionOrFullName" as bytes //payloads are recieved by callback given to acceptConnection method. ``` diff --git a/example/pubspec.lock b/example/pubspec.lock index 228a235..36df5aa 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -1,20 +1,34 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.11" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" async: dependency: transitive description: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.2.0" + version: "2.4.0" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "1.0.5" charcode: dependency: transitive description: @@ -29,6 +43,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.14.11" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.3" cupertino_icons: dependency: "direct main" description: @@ -46,6 +74,13 @@ packages: description: flutter source: sdk version: "0.0.0" + image: + dependency: transitive + description: + name: image + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.4" image_picker: dependency: "direct main" description: @@ -59,42 +94,49 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.5" + version: "0.12.6" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.1.6" + version: "1.1.8" nearby_connections: dependency: "direct dev" description: path: ".." relative: true source: path - version: "1.0.2+1" + version: "1.0.3" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.6.2" + version: "1.6.4" pedantic: dependency: transitive description: name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0+1" + petitparser: + dependency: transitive + description: + name: petitparser + url: "https://pub.dartlang.org" + source: hosted + version: "2.4.0" quiver: dependency: transitive description: name: quiver url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.0.5" sky_engine: dependency: transitive description: flutter @@ -127,7 +169,7 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "1.0.5" term_glyph: dependency: transitive description: @@ -141,7 +183,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.5" + version: "0.2.11" typed_data: dependency: transitive description: @@ -156,6 +198,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.8" + xml: + dependency: transitive + description: + name: xml + url: "https://pub.dartlang.org" + source: hosted + version: "3.5.0" sdks: - dart: ">=2.2.2 <3.0.0" + dart: ">=2.4.0 <3.0.0" flutter: ">=1.5.0 <2.0.0" diff --git a/pubspec.lock b/pubspec.lock index 7642229..67a7df1 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,20 +1,34 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.11" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" async: dependency: transitive description: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.2.0" + version: "2.4.0" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "1.0.5" charcode: dependency: transitive description: @@ -29,6 +43,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.14.11" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.3" flutter: dependency: "direct main" description: flutter @@ -39,41 +67,55 @@ packages: description: flutter source: sdk version: "0.0.0" + image: + dependency: transitive + description: + name: image + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.4" matcher: dependency: transitive description: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.5" + version: "0.12.6" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.1.6" + version: "1.1.8" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.6.2" + version: "1.6.4" pedantic: dependency: transitive description: name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0+1" + petitparser: + dependency: transitive + description: + name: petitparser + url: "https://pub.dartlang.org" + source: hosted + version: "2.4.0" quiver: dependency: transitive description: name: quiver url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.0.5" sky_engine: dependency: transitive description: flutter @@ -106,7 +148,7 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "1.0.5" term_glyph: dependency: transitive description: @@ -120,7 +162,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.5" + version: "0.2.11" typed_data: dependency: transitive description: @@ -135,5 +177,12 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.8" + xml: + dependency: transitive + description: + name: xml + url: "https://pub.dartlang.org" + source: hosted + version: "3.5.0" sdks: - dart: ">=2.2.2 <3.0.0" + dart: ">=2.4.0 <3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 3f3cec9..478e1ee 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,6 @@ name: nearby_connections description: Plugin for the android NearbyConnections API. Bytes and Files Supported. -version: 1.0.2+1 -author: Prerak Mann +version: 1.0.3 homepage: https://github.com/mannprerak2/nearby_connections environment: