@capacitor-community/bluetooth-le 7.0.0 → 7.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CapacitorCommunityBluetoothLe.podspec +17 -17
- package/LICENSE +21 -21
- package/README.md +94 -16
- package/android/build.gradle +68 -68
- package/android/src/main/AndroidManifest.xml +22 -22
- package/android/src/main/java/com/capacitorjs/community/plugins/bluetoothle/BluetoothLe.kt +1068 -1009
- package/android/src/main/java/com/capacitorjs/community/plugins/bluetoothle/Conversion.kt +51 -51
- package/android/src/main/java/com/capacitorjs/community/plugins/bluetoothle/Device.kt +720 -718
- package/android/src/main/java/com/capacitorjs/community/plugins/bluetoothle/DeviceList.kt +28 -28
- package/android/src/main/java/com/capacitorjs/community/plugins/bluetoothle/DeviceScanner.kt +189 -189
- package/dist/docs.json +926 -78
- package/dist/esm/bleClient.d.ts +277 -277
- package/dist/esm/bleClient.js +349 -349
- package/dist/esm/bleClient.js.map +1 -1
- package/dist/esm/config.d.ts +53 -53
- package/dist/esm/config.js +2 -2
- package/dist/esm/config.js.map +1 -1
- package/dist/esm/conversion.d.ts +34 -34
- package/dist/esm/conversion.js +84 -84
- package/dist/esm/conversion.js.map +1 -1
- package/dist/esm/definitions.d.ts +313 -292
- package/dist/esm/definitions.js +42 -42
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/index.d.ts +5 -5
- package/dist/esm/index.js +5 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/plugin.d.ts +2 -2
- package/dist/esm/plugin.js +4 -4
- package/dist/esm/plugin.js.map +1 -1
- package/dist/esm/queue.d.ts +3 -3
- package/dist/esm/queue.js +17 -17
- package/dist/esm/queue.js.map +1 -1
- package/dist/esm/timeout.d.ts +1 -1
- package/dist/esm/timeout.js +9 -9
- package/dist/esm/timeout.js.map +1 -1
- package/dist/esm/validators.d.ts +1 -1
- package/dist/esm/validators.js +11 -11
- package/dist/esm/validators.js.map +1 -1
- package/dist/esm/web.d.ts +56 -56
- package/dist/esm/web.js +340 -335
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +839 -834
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +839 -834
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/Conversion.swift +83 -83
- package/ios/Plugin/Device.swift +423 -423
- package/ios/Plugin/DeviceManager.swift +401 -349
- package/ios/Plugin/Info.plist +24 -24
- package/ios/Plugin/Logging.swift +8 -8
- package/ios/Plugin/Plugin.h +10 -10
- package/ios/Plugin/Plugin.m +41 -41
- package/ios/Plugin/Plugin.swift +682 -636
- package/ios/Plugin/ThreadSafeDictionary.swift +13 -13
- package/package.json +101 -101
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
require 'json'
|
|
2
|
-
|
|
3
|
-
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
|
-
|
|
5
|
-
Pod::Spec.new do |s|
|
|
6
|
-
s.name = 'CapacitorCommunityBluetoothLe'
|
|
7
|
-
s.version = package['version']
|
|
8
|
-
s.summary = package['description']
|
|
9
|
-
s.license = package['license']
|
|
10
|
-
s.homepage = package['repository']['url']
|
|
11
|
-
s.author = package['author']
|
|
12
|
-
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
|
|
13
|
-
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
14
|
-
s.ios.deployment_target = '14.0'
|
|
15
|
-
s.dependency 'Capacitor'
|
|
16
|
-
s.swift_version = '5.1'
|
|
17
|
-
end
|
|
1
|
+
require 'json'
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
|
+
|
|
5
|
+
Pod::Spec.new do |s|
|
|
6
|
+
s.name = 'CapacitorCommunityBluetoothLe'
|
|
7
|
+
s.version = package['version']
|
|
8
|
+
s.summary = package['description']
|
|
9
|
+
s.license = package['license']
|
|
10
|
+
s.homepage = package['repository']['url']
|
|
11
|
+
s.author = package['author']
|
|
12
|
+
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
|
|
13
|
+
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
14
|
+
s.ios.deployment_target = '14.0'
|
|
15
|
+
s.dependency 'Capacitor'
|
|
16
|
+
s.swift_version = '5.1'
|
|
17
|
+
end
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2021 Capacitor plugin for Bluetooth Low Energy
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Capacitor plugin for Bluetooth Low Energy
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<a href="https://www.npmjs.com/package/@capacitor-community/bluetooth-le"><img src="https://img.shields.io/npm/dw/@capacitor-community/bluetooth-le?style=flat-square" /></a>
|
|
14
14
|
<a href="https://www.npmjs.com/package/@capacitor-community/bluetooth-le"><img src="https://img.shields.io/npm/v/@capacitor-community/bluetooth-le?style=flat-square" /></a>
|
|
15
15
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
16
|
-
<a href="#contributors-"><img src="https://img.shields.io/badge/all%20contributors-
|
|
16
|
+
<a href="#contributors-"><img src="https://img.shields.io/badge/all%20contributors-23-orange?style=flat-square" /></a>
|
|
17
17
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
18
18
|
</p>
|
|
19
19
|
|
|
@@ -89,6 +89,7 @@ Below is an index of all the methods available.
|
|
|
89
89
|
- [`startNotifications(...)`](#startnotifications)
|
|
90
90
|
- [`stopNotifications(...)`](#stopnotifications)
|
|
91
91
|
- [Interfaces](#interfaces)
|
|
92
|
+
- [Type Aliases](#type-aliases)
|
|
92
93
|
- [Enums](#enums)
|
|
93
94
|
|
|
94
95
|
</docgen-index>
|
|
@@ -345,6 +346,7 @@ _Note_: web support depends on the browser, see [implementation status](https://
|
|
|
345
346
|
| [`requestLEScan(...)`](#requestlescan) | ✅ | ✅ | 🚩 |
|
|
346
347
|
| [`stopLEScan()`](#stoplescan) | ✅ | ✅ | 🚩 |
|
|
347
348
|
| [`getDevices(...)`](#getdevices) | ✅ | ✅ | 🚩 |
|
|
349
|
+
| [`getBondedDevices(...)`](#getbondeddevices) | ✅ | ❌ | ❌ |
|
|
348
350
|
| [`getConnectedDevices(...)`](#getconnecteddevices) | ✅ | ✅ | 🚩 |
|
|
349
351
|
| [`connect(...)`](#connect) | ✅ | ✅ | ✅ |
|
|
350
352
|
| [`createBond(...)`](#createbond) | ✅ | ❌ | ❌ |
|
|
@@ -934,6 +936,86 @@ Stop listening to the changes of the value of a characteristic. For an example,
|
|
|
934
936
|
| **`optionalServices`** | <code>string[]</code> | For **web**, all services that will be used have to be listed under services or optionalServices, e.g. [numberToUUID(0x180f)] (see [UUID format](#uuid-format)) |
|
|
935
937
|
| **`allowDuplicates`** | <code>boolean</code> | Normally scans will discard the second and subsequent advertisements from a single device. If you need to receive them, set allowDuplicates to true (only applicable in `requestLEScan`). (default: false) |
|
|
936
938
|
| **`scanMode`** | <code><a href="#scanmode">ScanMode</a></code> | Android scan mode (default: <a href="#scanmode">ScanMode.SCAN_MODE_BALANCED</a>) |
|
|
939
|
+
| **`manufacturerData`** | <code>ManufacturerDataFilter[]</code> | Allow scanning for devices with a specific manufacturer data https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/requestDevice#manufacturerdata |
|
|
940
|
+
|
|
941
|
+
#### ManufacturerDataFilter
|
|
942
|
+
|
|
943
|
+
| Prop | Type | Description |
|
|
944
|
+
| ----------------------- | ------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
945
|
+
| **`companyIdentifier`** | <code>number</code> | Company ID (sometimes called the manufacturer ID) to search for in the manufacturer data field. |
|
|
946
|
+
| **`dataPrefix`** | <code><a href="#uint8array">Uint8Array</a></code> | Prefix to match in the manufacturer data field. On **Android** this field is mandatory. |
|
|
947
|
+
| **`mask`** | <code><a href="#uint8array">Uint8Array</a></code> | Set filter on partial manufacture data. For any bit in the mask, set it the 1 if it needs to match the one in manufacturer data, otherwise set it to 0. The `mask` must have the same length of dataPrefix. |
|
|
948
|
+
|
|
949
|
+
#### Uint8Array
|
|
950
|
+
|
|
951
|
+
A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
|
|
952
|
+
requested number of bytes could not be allocated an exception is raised.
|
|
953
|
+
|
|
954
|
+
| Prop | Type | Description |
|
|
955
|
+
| ----------------------- | ----------------------------------------------------------- | ---------------------------------------------------------------------------- |
|
|
956
|
+
| **`BYTES_PER_ELEMENT`** | <code>number</code> | The size in bytes of each element in the array. |
|
|
957
|
+
| **`buffer`** | <code><a href="#arraybufferlike">ArrayBufferLike</a></code> | The <a href="#arraybuffer">ArrayBuffer</a> instance referenced by the array. |
|
|
958
|
+
| **`byteLength`** | <code>number</code> | The length in bytes of the array. |
|
|
959
|
+
| **`byteOffset`** | <code>number</code> | The offset in bytes of the array. |
|
|
960
|
+
| **`length`** | <code>number</code> | The length of the array. |
|
|
961
|
+
|
|
962
|
+
| Method | Signature | Description |
|
|
963
|
+
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
964
|
+
| **copyWithin** | (target: number, start: number, end?: number \| undefined) => this | Returns the this object after copying a section of the array identified by start and end to the same array starting at position target |
|
|
965
|
+
| **every** | (predicate: (value: number, index: number, array: <a href="#uint8array">Uint8Array</a>) => unknown, thisArg?: any) => boolean | Determines whether all the members of an array satisfy the specified test. |
|
|
966
|
+
| **fill** | (value: number, start?: number \| undefined, end?: number \| undefined) => this | Returns the this object after filling the section identified by start and end with value |
|
|
967
|
+
| **filter** | (predicate: (value: number, index: number, array: <a href="#uint8array">Uint8Array</a>) => any, thisArg?: any) => <a href="#uint8array">Uint8Array</a> | Returns the elements of an array that meet the condition specified in a callback function. |
|
|
968
|
+
| **find** | (predicate: (value: number, index: number, obj: <a href="#uint8array">Uint8Array</a>) => boolean, thisArg?: any) => number \| undefined | Returns the value of the first element in the array where predicate is true, and undefined otherwise. |
|
|
969
|
+
| **findIndex** | (predicate: (value: number, index: number, obj: <a href="#uint8array">Uint8Array</a>) => boolean, thisArg?: any) => number | Returns the index of the first element in the array where predicate is true, and -1 otherwise. |
|
|
970
|
+
| **forEach** | (callbackfn: (value: number, index: number, array: <a href="#uint8array">Uint8Array</a>) => void, thisArg?: any) => void | Performs the specified action for each element in an array. |
|
|
971
|
+
| **indexOf** | (searchElement: number, fromIndex?: number \| undefined) => number | Returns the index of the first occurrence of a value in an array. |
|
|
972
|
+
| **join** | (separator?: string \| undefined) => string | Adds all the elements of an array separated by the specified separator string. |
|
|
973
|
+
| **lastIndexOf** | (searchElement: number, fromIndex?: number \| undefined) => number | Returns the index of the last occurrence of a value in an array. |
|
|
974
|
+
| **map** | (callbackfn: (value: number, index: number, array: <a href="#uint8array">Uint8Array</a>) => number, thisArg?: any) => <a href="#uint8array">Uint8Array</a> | Calls a defined callback function on each element of an array, and returns an array that contains the results. |
|
|
975
|
+
| **reduce** | (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: <a href="#uint8array">Uint8Array</a>) => number) => number | Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. |
|
|
976
|
+
| **reduce** | (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: <a href="#uint8array">Uint8Array</a>) => number, initialValue: number) => number | |
|
|
977
|
+
| **reduce** | <U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: <a href="#uint8array">Uint8Array</a>) => U, initialValue: U) => U | Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. |
|
|
978
|
+
| **reduceRight** | (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: <a href="#uint8array">Uint8Array</a>) => number) => number | Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. |
|
|
979
|
+
| **reduceRight** | (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: <a href="#uint8array">Uint8Array</a>) => number, initialValue: number) => number | |
|
|
980
|
+
| **reduceRight** | <U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: <a href="#uint8array">Uint8Array</a>) => U, initialValue: U) => U | Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. |
|
|
981
|
+
| **reverse** | () => <a href="#uint8array">Uint8Array</a> | Reverses the elements in an Array. |
|
|
982
|
+
| **set** | (array: <a href="#arraylike">ArrayLike</a><number>, offset?: number \| undefined) => void | Sets a value or an array of values. |
|
|
983
|
+
| **slice** | (start?: number \| undefined, end?: number \| undefined) => <a href="#uint8array">Uint8Array</a> | Returns a section of an array. |
|
|
984
|
+
| **some** | (predicate: (value: number, index: number, array: <a href="#uint8array">Uint8Array</a>) => unknown, thisArg?: any) => boolean | Determines whether the specified callback function returns true for any element of an array. |
|
|
985
|
+
| **sort** | (compareFn?: ((a: number, b: number) => number) \| undefined) => this | Sorts an array. |
|
|
986
|
+
| **subarray** | (begin?: number \| undefined, end?: number \| undefined) => <a href="#uint8array">Uint8Array</a> | Gets a new <a href="#uint8array">Uint8Array</a> view of the <a href="#arraybuffer">ArrayBuffer</a> store for this array, referencing the elements at begin, inclusive, up to end, exclusive. |
|
|
987
|
+
| **toLocaleString** | () => string | Converts a number to a string by using the current locale. |
|
|
988
|
+
| **toString** | () => string | Returns a string representation of an array. |
|
|
989
|
+
| **valueOf** | () => <a href="#uint8array">Uint8Array</a> | Returns the primitive value of the specified object. |
|
|
990
|
+
|
|
991
|
+
#### ArrayLike
|
|
992
|
+
|
|
993
|
+
| Prop | Type |
|
|
994
|
+
| ------------ | ------------------- |
|
|
995
|
+
| **`length`** | <code>number</code> |
|
|
996
|
+
|
|
997
|
+
#### ArrayBufferTypes
|
|
998
|
+
|
|
999
|
+
Allowed <a href="#arraybuffer">ArrayBuffer</a> types for the buffer of an ArrayBufferView and related Typed Arrays.
|
|
1000
|
+
|
|
1001
|
+
| Prop | Type |
|
|
1002
|
+
| ----------------- | --------------------------------------------------- |
|
|
1003
|
+
| **`ArrayBuffer`** | <code><a href="#arraybuffer">ArrayBuffer</a></code> |
|
|
1004
|
+
|
|
1005
|
+
#### ArrayBuffer
|
|
1006
|
+
|
|
1007
|
+
Represents a raw buffer of binary data, which is used to store data for the
|
|
1008
|
+
different typed arrays. ArrayBuffers cannot be read from or written to directly,
|
|
1009
|
+
but can be passed to a typed array or <a href="#dataview">DataView</a> Object to interpret the raw
|
|
1010
|
+
buffer as needed.
|
|
1011
|
+
|
|
1012
|
+
| Prop | Type | Description |
|
|
1013
|
+
| ---------------- | ------------------- | ------------------------------------------------------------------------------- |
|
|
1014
|
+
| **`byteLength`** | <code>number</code> | Read-only. The length of the <a href="#arraybuffer">ArrayBuffer</a> (in bytes). |
|
|
1015
|
+
|
|
1016
|
+
| Method | Signature | Description |
|
|
1017
|
+
| --------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
|
|
1018
|
+
| **slice** | (begin: number, end?: number \| undefined) => <a href="#arraybuffer">ArrayBuffer</a> | Returns a section of an <a href="#arraybuffer">ArrayBuffer</a>. |
|
|
937
1019
|
|
|
938
1020
|
#### ScanResult
|
|
939
1021
|
|
|
@@ -975,21 +1057,6 @@ Stop listening to the changes of the value of a characteristic. For an example,
|
|
|
975
1057
|
| **setUint16** | (byteOffset: number, value: number, littleEndian?: boolean \| undefined) => void | Stores an Uint16 value at the specified byte offset from the start of the view. |
|
|
976
1058
|
| **setUint32** | (byteOffset: number, value: number, littleEndian?: boolean \| undefined) => void | Stores an Uint32 value at the specified byte offset from the start of the view. |
|
|
977
1059
|
|
|
978
|
-
#### ArrayBuffer
|
|
979
|
-
|
|
980
|
-
Represents a raw buffer of binary data, which is used to store data for the
|
|
981
|
-
different typed arrays. ArrayBuffers cannot be read from or written to directly,
|
|
982
|
-
but can be passed to a typed array or <a href="#dataview">DataView</a> Object to interpret the raw
|
|
983
|
-
buffer as needed.
|
|
984
|
-
|
|
985
|
-
| Prop | Type | Description |
|
|
986
|
-
| ---------------- | ------------------- | ------------------------------------------------------------------------------- |
|
|
987
|
-
| **`byteLength`** | <code>number</code> | Read-only. The length of the <a href="#arraybuffer">ArrayBuffer</a> (in bytes). |
|
|
988
|
-
|
|
989
|
-
| Method | Signature | Description |
|
|
990
|
-
| --------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
|
|
991
|
-
| **slice** | (begin: number, end?: number \| undefined) => <a href="#arraybuffer">ArrayBuffer</a> | Returns a section of an <a href="#arraybuffer">ArrayBuffer</a>. |
|
|
992
|
-
|
|
993
1060
|
#### TimeoutOptions
|
|
994
1061
|
|
|
995
1062
|
| Prop | Type | Description |
|
|
@@ -1034,6 +1101,12 @@ buffer as needed.
|
|
|
1034
1101
|
| ---------- | ------------------- |
|
|
1035
1102
|
| **`uuid`** | <code>string</code> |
|
|
1036
1103
|
|
|
1104
|
+
### Type Aliases
|
|
1105
|
+
|
|
1106
|
+
#### ArrayBufferLike
|
|
1107
|
+
|
|
1108
|
+
<code>ArrayBufferTypes[keyof ArrayBufferTypes]</code>
|
|
1109
|
+
|
|
1037
1110
|
### Enums
|
|
1038
1111
|
|
|
1039
1112
|
#### ScanMode
|
|
@@ -1132,6 +1205,11 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
1132
1205
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/peitschie"><img src="https://avatars.githubusercontent.com/u/1052079?v=4?s=100" width="100px;" alt="Philip Peitsch"/><br /><sub><b>Philip Peitsch</b></sub></a><br /><a href="https://github.com/capacitor-community/bluetooth-le/commits?author=peitschie" title="Code">💻</a> <a href="#question-peitschie" title="Answering Questions">💬</a></td>
|
|
1133
1206
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/NaterGator"><img src="https://avatars.githubusercontent.com/u/2575?v=4?s=100" width="100px;" alt="Nate Weibley"/><br /><sub><b>Nate Weibley</b></sub></a><br /><a href="https://github.com/capacitor-community/bluetooth-le/commits?author=NaterGator" title="Code">💻</a></td>
|
|
1134
1207
|
<td align="center" valign="top" width="14.28%"><a href="http://www.enesi.it"><img src="https://avatars.githubusercontent.com/u/2611534?v=4?s=100" width="100px;" alt="Emanuele Toffolon"/><br /><sub><b>Emanuele Toffolon</b></sub></a><br /><a href="https://github.com/capacitor-community/bluetooth-le/commits?author=emanueletoffolon" title="Code">💻</a></td>
|
|
1208
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/steinerjakob"><img src="https://avatars.githubusercontent.com/u/23446667?v=4?s=100" width="100px;" alt="Jakob Steiner"/><br /><sub><b>Jakob Steiner</b></sub></a><br /><a href="https://github.com/capacitor-community/bluetooth-le/commits?author=steinerjakob" title="Code">💻</a></td>
|
|
1209
|
+
</tr>
|
|
1210
|
+
<tr>
|
|
1211
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/gion-andri"><img src="https://avatars.githubusercontent.com/u/540998?v=4?s=100" width="100px;" alt="Gion-Andri Cantieni"/><br /><sub><b>Gion-Andri Cantieni</b></sub></a><br /><a href="https://github.com/capacitor-community/bluetooth-le/commits?author=gion-andri" title="Code">💻</a></td>
|
|
1212
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/JasonAsmk"><img src="https://avatars.githubusercontent.com/u/994111?v=4?s=100" width="100px;" alt="Iason Asimakopoulos"/><br /><sub><b>Iason Asimakopoulos</b></sub></a><br /><a href="https://github.com/capacitor-community/bluetooth-le/commits?author=JasonAsmk" title="Code">💻</a></td>
|
|
1135
1213
|
</tr>
|
|
1136
1214
|
</tbody>
|
|
1137
1215
|
</table>
|
package/android/build.gradle
CHANGED
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
ext {
|
|
2
|
-
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
|
|
3
|
-
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0'
|
|
4
|
-
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1'
|
|
5
|
-
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1'
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
buildscript {
|
|
9
|
-
ext.kotlin_version = project.hasProperty("kotlin_version") ? rootProject.ext.kotlin_version : '1.9.25'
|
|
10
|
-
ext.coreKtx = project.hasProperty('coreKtx') ? rootProject.ext.coreKtx : '1.12.0'
|
|
11
|
-
|
|
12
|
-
repositories {
|
|
13
|
-
google()
|
|
14
|
-
mavenCentral()
|
|
15
|
-
}
|
|
16
|
-
dependencies {
|
|
17
|
-
classpath 'com.android.tools.build:gradle:8.7.2'
|
|
18
|
-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
apply plugin: 'com.android.library'
|
|
23
|
-
apply plugin: 'kotlin-android'
|
|
24
|
-
|
|
25
|
-
android {
|
|
26
|
-
namespace "com.capacitorjs.community.plugins.bluetoothle"
|
|
27
|
-
compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 35
|
|
28
|
-
defaultConfig {
|
|
29
|
-
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 23
|
|
30
|
-
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 35
|
|
31
|
-
versionCode 1
|
|
32
|
-
versionName "1.0"
|
|
33
|
-
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
34
|
-
}
|
|
35
|
-
buildTypes {
|
|
36
|
-
release {
|
|
37
|
-
minifyEnabled false
|
|
38
|
-
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
lintOptions {
|
|
42
|
-
abortOnError false
|
|
43
|
-
}
|
|
44
|
-
compileOptions {
|
|
45
|
-
sourceCompatibility JavaVersion.VERSION_21
|
|
46
|
-
targetCompatibility JavaVersion.VERSION_21
|
|
47
|
-
}
|
|
48
|
-
kotlinOptions {
|
|
49
|
-
jvmTarget = 21
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
repositories {
|
|
54
|
-
google()
|
|
55
|
-
mavenCentral()
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
dependencies {
|
|
60
|
-
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
61
|
-
implementation project(':capacitor-android')
|
|
62
|
-
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
|
63
|
-
testImplementation "junit:junit:$junitVersion"
|
|
64
|
-
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
65
|
-
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
66
|
-
implementation "androidx.core:core-ktx:$coreKtx"
|
|
67
|
-
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
68
|
-
}
|
|
1
|
+
ext {
|
|
2
|
+
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
|
|
3
|
+
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0'
|
|
4
|
+
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1'
|
|
5
|
+
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1'
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
buildscript {
|
|
9
|
+
ext.kotlin_version = project.hasProperty("kotlin_version") ? rootProject.ext.kotlin_version : '1.9.25'
|
|
10
|
+
ext.coreKtx = project.hasProperty('coreKtx') ? rootProject.ext.coreKtx : '1.12.0'
|
|
11
|
+
|
|
12
|
+
repositories {
|
|
13
|
+
google()
|
|
14
|
+
mavenCentral()
|
|
15
|
+
}
|
|
16
|
+
dependencies {
|
|
17
|
+
classpath 'com.android.tools.build:gradle:8.7.2'
|
|
18
|
+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
apply plugin: 'com.android.library'
|
|
23
|
+
apply plugin: 'kotlin-android'
|
|
24
|
+
|
|
25
|
+
android {
|
|
26
|
+
namespace "com.capacitorjs.community.plugins.bluetoothle"
|
|
27
|
+
compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 35
|
|
28
|
+
defaultConfig {
|
|
29
|
+
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 23
|
|
30
|
+
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 35
|
|
31
|
+
versionCode 1
|
|
32
|
+
versionName "1.0"
|
|
33
|
+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
34
|
+
}
|
|
35
|
+
buildTypes {
|
|
36
|
+
release {
|
|
37
|
+
minifyEnabled false
|
|
38
|
+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
lintOptions {
|
|
42
|
+
abortOnError false
|
|
43
|
+
}
|
|
44
|
+
compileOptions {
|
|
45
|
+
sourceCompatibility JavaVersion.VERSION_21
|
|
46
|
+
targetCompatibility JavaVersion.VERSION_21
|
|
47
|
+
}
|
|
48
|
+
kotlinOptions {
|
|
49
|
+
jvmTarget = 21
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
repositories {
|
|
54
|
+
google()
|
|
55
|
+
mavenCentral()
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
dependencies {
|
|
60
|
+
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
61
|
+
implementation project(':capacitor-android')
|
|
62
|
+
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
|
63
|
+
testImplementation "junit:junit:$junitVersion"
|
|
64
|
+
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
65
|
+
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
66
|
+
implementation "androidx.core:core-ktx:$coreKtx"
|
|
67
|
+
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
68
|
+
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
2
|
-
xmlns:tools="http://schemas.android.com/tools">
|
|
3
|
-
<!-- Bluetooth -->
|
|
4
|
-
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
|
5
|
-
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
|
6
|
-
<uses-permission
|
|
7
|
-
android:name="android.permission.BLUETOOTH"
|
|
8
|
-
android:maxSdkVersion="30" />
|
|
9
|
-
<uses-permission
|
|
10
|
-
android:name="android.permission.BLUETOOTH_ADMIN"
|
|
11
|
-
android:maxSdkVersion="30" />
|
|
12
|
-
<uses-permission
|
|
13
|
-
android:name="android.permission.BLUETOOTH_SCAN"
|
|
14
|
-
tools:targetApi="s" />
|
|
15
|
-
<uses-permission
|
|
16
|
-
android:name="android.permission.BLUETOOTH_CONNECT"
|
|
17
|
-
tools:targetApi="s" />
|
|
18
|
-
|
|
19
|
-
<uses-feature
|
|
20
|
-
android:name="android.hardware.bluetooth_le"
|
|
21
|
-
android:required="false" />
|
|
22
|
-
</manifest>
|
|
1
|
+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
2
|
+
xmlns:tools="http://schemas.android.com/tools">
|
|
3
|
+
<!-- Bluetooth -->
|
|
4
|
+
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
|
5
|
+
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
|
6
|
+
<uses-permission
|
|
7
|
+
android:name="android.permission.BLUETOOTH"
|
|
8
|
+
android:maxSdkVersion="30" />
|
|
9
|
+
<uses-permission
|
|
10
|
+
android:name="android.permission.BLUETOOTH_ADMIN"
|
|
11
|
+
android:maxSdkVersion="30" />
|
|
12
|
+
<uses-permission
|
|
13
|
+
android:name="android.permission.BLUETOOTH_SCAN"
|
|
14
|
+
tools:targetApi="s" />
|
|
15
|
+
<uses-permission
|
|
16
|
+
android:name="android.permission.BLUETOOTH_CONNECT"
|
|
17
|
+
tools:targetApi="s" />
|
|
18
|
+
|
|
19
|
+
<uses-feature
|
|
20
|
+
android:name="android.hardware.bluetooth_le"
|
|
21
|
+
android:required="false" />
|
|
22
|
+
</manifest>
|
|
23
23
|
|