You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+77Lines changed: 77 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,80 @@
1
+
## 6.5.0 - 2021-06-21
2
+
- Operations are queued per device connection rather than globally on Android
3
+
- Use service data if available on Android
4
+
5
+
## 6.4.1 - 2021-06-08
6
+
- Ensure Android subscriptions are returned in order [\#419](https://github.com/randdusing/cordova-plugin-bluetoothle/issues/419)
7
+
8
+
## 6.4.0 - 2021-06-08
9
+
- Fix issue with writeQ when peripheral disconnects [\#690](https://github.com/randdusing/cordova-plugin-bluetoothle/issues/690)
10
+
- Add JavaScript helper methods for encoding and decoding Unicode strings
11
+
12
+
## 6.3.1 - 2021-04-07
13
+
- Fix #retrieveConnected() for Android, Dual Type devices are no longer filtered out. [\#559](https://github.com/randdusing/cordova-plugin-bluetoothle/issues/559)
14
+
15
+
## 6.3.0 - 2021-02-19
16
+
- Add #retrievePeripheralsByAddress() for iOS and OSX
17
+
18
+
## 6.2.2 - 2021-02-19
19
+
- Remove ACCESS_BACKGROUND_LOCATION permission. Revert changes from v6.1.1. This should be added manually if background permissions are actually needed
20
+
21
+
## 6.2.1 - 2021-02-05
22
+
- Update types for NotifyParams
23
+
24
+
## 6.2.0 - 2020-12-23
25
+
- Add #setPin() method for Android
26
+
27
+
## 6.1.1 - 2020-12-04
28
+
- Add ACCESS_BACKGROUND_LOCATION permission to fix issue with Android target SDK 29
29
+
30
+
## 6.1.0 - 2020-11-07
31
+
- Allow specifying transport mode for Android
32
+
33
+
## 6.0.2 - 2020-10-10
34
+
- Add name when advertising
35
+
36
+
## 6.0.1 - 2020-09-19
37
+
- Force re-discovery when clearCache => true. [\#634](https://github.com/randdusing/cordova-plugin-bluetoothle/issues/634)
Copy file name to clipboardExpand all lines: package.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "cordova-plugin-bluetoothle",
3
-
"version": "4.5.7",
3
+
"version": "6.5.0",
4
4
"description": "Use the Bluetooth Low Energy plugin to connect your Cordova app to new Bluetooth devices like heart rate monitors, thermometers, etc...",
@@ -79,6 +82,8 @@ This plugin allows you to interact with Bluetooth LE devices on Android, iOS, an
79
82
-[bytesToEncodedString](#bytestoencodedstring)
80
83
-[stringToBytes](#stringtobytes)
81
84
-[bytesToString](#bytestostring)
85
+
-[encodeUnicode](#encodeunicode)
86
+
-[decodeUnicode](#decodeunicode)
82
87
-[Example](#example)
83
88
-[Data Parsing Example](#data-parsing-example)
84
89
-[Sample: Discover and interact with Bluetooth LE devices](#sample-discover-and-interact-with-bluetooth-le-devices)
@@ -95,8 +100,8 @@ This plugin allows you to interact with Bluetooth LE devices on Android, iOS, an
95
100
## Requirements ##
96
101
97
102
* Cordova 5.0.0 or higher
98
-
* Android 4.3 or higher, Android Cordova library 5.0.0 or higher, target Android API 23or higher
99
-
* iOS 7 or higher
103
+
* Android Cordova library 5.0.0 or higher, target Android API 23/Platform 6.0 or higher (support for older Android versions should use versions 2.4.0 or below)
104
+
* iOS 10 or higher
100
105
* Windows Phone 8.1 (Tested on Nokia Lumia 630)
101
106
* Windows 10 UWP
102
107
* Device hardware must be certified for Bluetooth LE. i.e. Nexus 7 (2012) doesn't support Bluetooth LE even after upgrading to 4.3 (or higher) without a modification
@@ -237,6 +242,7 @@ Neither Android nor iOS support Bluetooth on emulators, so you'll need to test o
@@ -1276,24 +1289,33 @@ Value is a base64 encoded string of written bytes. Use bluetoothle.encodedString
1276
1289
var returnObj = {"status":"written","service":"180F","characteristic":"2A19","value":"V3JpdGUgSGVsbG8gV29ybGQ=","address":"ABC123"}
1277
1290
var bytes =bluetoothle.encodedStringToBytes(returnObj.value);
1278
1291
var string =bluetoothle.bytesToString(bytes); //This should equal Write Hello World
1292
+
1293
+
// if your code includes special characters you should use the decodeUnicode helper function
1294
+
var string =bluetoothle.decodeUnicode(returnObj.value);
1279
1295
```
1280
1296
1281
1297
1282
1298
1283
1299
### writeQ ###
1284
-
Write Quick / Queue, use this method to quickly execute write without response commands when writing more than 20 bytes at a time. The data will automatically be split up into 20 bytes packets. On iOS, these packets are written immediately since iOS uses queues. You probably won't see much of a performance increase using writeQ. On Android, a queue isn't used internally. Instead another call shouldn't be made until onCharacteristicWrite is called. This could be done at the Javascript layer, but the Javascript to plugin "bridge" must be crossed twice, which leads to some significant slow downs when milliseconds make a difference. For even better write throughput, use requestConnectionPriority('high') as well. Note, no callback will occur on write without response on iOS.
1300
+
Write Quick / Queue, use this method to quickly execute write without response commands when writing more than 20 bytes at a time. The data will automatically be split up into 20 bytes packets by default or you can increase that by setting `chunkSize`. On iOS, these packets are written immediately since iOS uses queues. You probably won't see much of a performance increase using writeQ unless you use `type="noResponse"` and set `chunkSize` higher than 20. On Android, a queue isn't used internally. Instead another call shouldn't be made until onCharacteristicWrite is called. This could be done at the Javascript layer, but the Javascript to plugin "bridge" must be crossed twice, which leads to some significant slow downs when milliseconds make a difference. For even better write throughput, use requestConnectionPriority('high') and mtu(SAME_VALUE_AS_CHUNK_SIZE_PARAM) as well.
1285
1301
1286
1302
Warnings
1287
1303
* This is experimental. Test heavily before using in any production code.
1288
-
* iOS won't see much performance gain, but Android should.
1304
+
* To see a performance gain you should use this in combination with requestConnectionPriority('high') and mtu(`MTU_VALUE`) and then calling this method with `type="noResponse"` and set `chunkSize` to `MTU_VALUE`.
1305
+
* Only supported on iOS11+.
1289
1306
* Only supports one call at a time. Don't execute back to back, use on multiple devices, or multiple characteristics.
Retrieve paired Bluetooth LE devices based on their address. Wraps the iOS method [CBCentralManager.retrievePeripheralsWithIdentifiers](https://developer.apple.com/documentation/corebluetooth/cbcentralmanager/1519127-retrieveperipheralswithidentifie?language=objc). iOS support only. Will return an error if used on Android.
Respond to a read or write request. On Android, a device address is required
2010
2089
2011
2090
```javascript
2012
2091
bluetoothle.respond(success, error, params);
@@ -2038,7 +2117,7 @@ var params = {
2038
2117
2039
2118
2040
2119
### notify ###
2041
-
Update a value for a subscription. Currently all subscribed devices will receive update. Device specific updates will be added in the future. If ```sent``` equals false in the return value, you must wait for the ```peripheralManagerIsReadyToUpdateSubscribers``` event before sending more updates.
2120
+
Update a value for a subscription. Currently all subscribed devices will receive updates on iOS. Device specific updates will be added in the future. On Android, a device address is required. If ```sent``` equals false in the return value, you must wait for the ```peripheralManagerIsReadyToUpdateSubscribers``` event before sending more updates.
2042
2121
2043
2122
```javascript
2044
2123
bluetoothle.notify(success, error, params);
@@ -2050,6 +2129,7 @@ var params = {
2050
2129
"service":"1234",
2051
2130
"characteristic":"ABCD",
2052
2131
"value":"U3Vic2NyaWJlIEhlbGxvIFdvcmxk"//Subscribe Hello World
2132
+
// "address": "5163F1E0-5341-AF9B-9F67-613E15EC83F7" // only on android
2053
2133
};
2054
2134
```
2055
2135
@@ -2172,6 +2252,20 @@ if (obj.status == "subscribedResult")
2172
2252
}
2173
2253
```
2174
2254
2255
+
### encodeUnicode ###
2256
+
Helper function to convert unicode string to base64 encoded string. This function can be used to encode special characters such as emojis.
2257
+
2258
+
```javascript
2259
+
bluetoothle.encodeUnicode(string);
2260
+
```
2261
+
2262
+
### decodeUnicode ###
2263
+
Helper function to convert a base64 encoded string to unicode string. This function also decodes special characters such as emojis.
2264
+
2265
+
```javascript
2266
+
bluetoothle.decodeUnicode(string);
2267
+
```
2268
+
2175
2269
## Sample: Discover and interact with Bluetooth LE devices ##
2176
2270
2177
2271
We'll build an app that lets you discover Bluetooth Low Energy (LE) devices that are around you, connect to a one, and then look at all of the information that you can obtain from that device such as signal strength, supported services, battery level and more.
0 commit comments