prep for new release, v1.0.3

This commit is contained in:
Prerak Mann 2019-12-18 17:07:33 +05:30
parent e0b80b75fc
commit 0f2a651519
6 changed files with 137 additions and 27 deletions

3
.gitignore vendored
View File

@ -6,3 +6,6 @@
build/
.idea/
example/ios/Flutter/flutter_export_environment.sh
example/.flutter-plugins-dependencies

View File

@ -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

View File

@ -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.
```

View File

@ -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"

View File

@ -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"

View File

@ -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 <mannprerak2@gmail.com>
version: 1.0.3
homepage: https://github.com/mannprerak2/nearby_connections
environment: