@iotize/device-com-ble.cordova 3.3.1 → 3.3.2

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "author": "IoTize <contact@iotize.com>",
3
3
  "license": "MIT",
4
4
  "name": "@iotize/device-com-ble.cordova",
5
- "version": "3.3.1",
5
+ "version": "3.3.2",
6
6
  "cordova": {
7
7
  "id": "@iotize/device-com-ble.cordova",
8
8
  "platforms": [
package/plugin.xml CHANGED
@@ -1,63 +1,66 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" id="@iotize/device-com-ble.cordova" version="2.0.0">
3
-
4
- <name>@iotize/device-com-ble.cordova</name>
5
- <description>Bluetooth Low Energy (BLE) Plugin for IoTize devices</description>
6
- <license>MIT</license>
7
- <keywords>bluetooth, BLE, bluetooth low energy, TapNLink, IoTize</keywords>
8
-
9
-
10
- <js-module src="www/plugin.js" name="iotizeBLE">
11
- <clobbers target="iotizeBLE" />
12
- </js-module>
13
-
14
- <platform name="android">
15
- <config-file target="res/xml/config.xml" parent="/*">
16
- <feature name="BLECom">
17
- <param name="android-package" value="com.iotize.plugin.cordova.ble.BLECom"/>
18
- </feature>
19
- </config-file>
20
- <framework src="src/android/build.gradle" custom="true" type="gradleReference" />
21
- <source-file src="src/android/src/ble" target-dir="java/com/iotize/plugin/cordova"/>
22
- <config-file target="AndroidManifest.xml" parent="/manifest">
23
- <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
24
- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
25
- <uses-permission android:name="android.permission.BLUETOOTH"/>
26
- <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
27
- </config-file>
28
- </platform>
29
-
30
- <platform name="windows">
31
- <js-module src="src/windows/iotize-ble-com.js" name="BLECom">
32
- <merges target="" />
33
- </js-module>
34
- <framework src="src/windows/ioTizeBLE.winmd" custom="true"/>
35
- <config-file target="package.appxmanifest" parent="/Package/Capabilities">
36
- <DeviceCapability Name="bluetooth"/>
37
- <DeviceCapability Name="radios"/>
38
- </config-file>
39
- </platform>
40
-
41
- <platform name="ios">
42
- <dependency id="cordova-plugin-add-swift-support"/>
43
- <config-file target="config.xml" parent="/*">
44
- <feature name="BLECom">
45
- <param name="ios-package" value="BLECom" />
46
- </feature>
47
- </config-file>
48
- <source-file src="src/ios/BLECom.swift" />
49
- <source-file src="src/ios/BLEManager.swift" />
50
- <source-file src="src/ios/BLETapPeripheral.swift" />
51
- <source-file src="src/ios/BLEGenericPeripheral.swift" />
52
- <source-file src="src/ios/CBPeripheralConverter.swift" />
53
- <source-file src="src/ios/Queue.swift" />
54
-
55
- <config-file target="*-Info.plist" parent="NSBluetoothAlwaysUsageDescription">
56
- <string>Communicate with IoTize BLE Devices</string>
57
- </config-file>
58
- <config-file target="*-Info.plist" parent="NSBluetoothPeripheralUsageDescription">
59
- <string>Communicate with IoTize BLE Devices</string>
60
- </config-file>
61
- </platform>
62
-
63
- </plugin>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" id="@iotize/device-com-ble.cordova" version="2.0.0">
3
+
4
+ <name>@iotize/device-com-ble.cordova</name>
5
+ <description>Bluetooth Low Energy (BLE) Plugin for IoTize devices</description>
6
+ <license>MIT</license>
7
+ <keywords>bluetooth, BLE, bluetooth low energy, TapNLink, IoTize</keywords>
8
+
9
+
10
+ <js-module src="www/plugin.js" name="iotizeBLE">
11
+ <clobbers target="iotizeBLE" />
12
+ </js-module>
13
+
14
+ <platform name="android">
15
+ <config-file target="res/xml/config.xml" parent="/*">
16
+ <feature name="BLECom">
17
+ <param name="android-package" value="com.iotize.plugin.cordova.ble.BLECom"/>
18
+ </feature>
19
+ </config-file>
20
+ <framework src="src/android/build.gradle" custom="true" type="gradleReference" />
21
+ <source-file src="src/android/src/ble" target-dir="java/com/iotize/plugin/cordova"/>
22
+ <config-file target="AndroidManifest.xml" parent="/manifest">
23
+ <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
24
+ <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
25
+ <uses-permission android:name="android.permission.BLUETOOTH"/>
26
+ <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
27
+ </config-file>
28
+ </platform>
29
+
30
+ <platform name="windows">
31
+ <js-module src="src/windows/iotize-ble-com.js" name="BLECom">
32
+ <merges target="" />
33
+ </js-module>
34
+ <framework src="src/windows/ioTizeBLE.winmd" custom="true"/>
35
+ <config-file target="package.appxmanifest" parent="/Package/Capabilities">
36
+ <DeviceCapability Name="bluetooth"/>
37
+ <DeviceCapability Name="radios"/>
38
+ </config-file>
39
+ </platform>
40
+
41
+ <platform name="ios">
42
+ <dependency id="cordova-plugin-add-swift-support"/>
43
+ <config-file target="config.xml" parent="/*">
44
+ <feature name="BLECom">
45
+ <param name="ios-package" value="BLECom" />
46
+ </feature>
47
+ </config-file>
48
+ <source-file src="src/ios/BLECom.swift" />
49
+ <source-file src="src/ios/BLEManager.swift" />
50
+ <source-file src="src/ios/BLETapPeripheral.swift" />
51
+ <source-file src="src/ios/BLEGenericPeripheral.swift" />
52
+ <source-file src="src/ios/CBPeripheralConverter.swift" />
53
+ <source-file src="src/ios/Queue.swift" />
54
+
55
+ <config-file target="*-Info.plist" parent="NSBluetoothAlwaysUsageDescription">
56
+ <string>Communicate with IoTize BLE Devices</string>
57
+ </config-file>
58
+ <config-file target="*-Info.plist" parent="NSBluetoothPeripheralUsageDescription">
59
+ <string>Communicate with IoTize BLE Devices</string>
60
+ </config-file>
61
+ <config-file target="*-Info.plist" parent="NSLocationWhenInUseUsageDescription">
62
+ <string>Communicate with IoTize BLE Devices</string>
63
+ </config-file>
64
+ </platform>
65
+
66
+ </plugin>
@@ -494,6 +494,7 @@ public class BLECom extends CordovaPlugin {
494
494
  }
495
495
  BluetoothDevice device = bluetoothAdapter.getRemoteDevice(macAddress);
496
496
  peripheral = new BLEProtocol(cordova.getActivity(), device);
497
+ peripheral.setConnectionPriority(BluetoothGatt.CONNECTION_PRIORITY_BALANCED);
497
498
  peripherals.put(macAddress, peripheral);
498
499
  if (initialMTU != null) {
499
500
  peripheral.setMTU(initialMTU);