Skip to content

Commit 0d5ebe8

Browse files
author
eddyverbruggen
committed
bump
1 parent 9d7e862 commit 0d5ebe8

File tree

4 files changed

+18
-8
lines changed

4 files changed

+18
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# NativeScript <img src="bluetooth.gif" height="20px" alt="Bluetooth"/> plugin
1+
# NativeScript <img src="https://github.com/EddyVerbruggen/nativescript-bluetooth/raw/master/bluetooth.gif" height="20px" alt="Bluetooth"/> plugin
22

33
### Use when you want to
44
* scan for Bluetooth LE / Smart peripherals,

bluetooth.android.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,9 @@ Bluetooth._MyGattCallback = android.bluetooth.BluetoothGattCallback.extend({
242242
},
243243

244244
onCharacteristicRead: function(bluetoothGatt, bluetoothGattCharacteristic, status) {
245-
if(Bluetooth.characteristicLogging)
245+
if (Bluetooth.characteristicLogging) {
246246
console.log("------- _MyGattCallback.onCharacteristicRead");
247+
}
247248

248249
var device = bluetoothGatt.getDevice();
249250
var stateObject = Bluetooth._connections[device.getAddress()];
@@ -263,8 +264,9 @@ Bluetooth._MyGattCallback = android.bluetooth.BluetoothGattCallback.extend({
263264
},
264265

265266
onCharacteristicChanged: function(bluetoothGatt, bluetoothGattCharacteristic) {
266-
if(Bluetooth.characteristicLogging)
267+
if (Bluetooth.characteristicLogging) {
267268
console.log("------- _MyGattCallback.onCharacteristicChanged");
269+
}
268270

269271
var device = bluetoothGatt.getDevice();
270272
var stateObject = Bluetooth._connections[device.getAddress()];
@@ -284,8 +286,9 @@ Bluetooth._MyGattCallback = android.bluetooth.BluetoothGattCallback.extend({
284286
},
285287

286288
onCharacteristicWrite: function(bluetoothGatt, bluetoothGattCharacteristic, status) {
287-
if(Bluetooth.characteristicLogging)
289+
if (Bluetooth.characteristicLogging) {
288290
console.log("------- _MyGattCallback.onCharacteristicWrite");
291+
}
289292

290293
var device = bluetoothGatt.getDevice();
291294
var stateObject = Bluetooth._connections[device.getAddress()];
@@ -294,8 +297,9 @@ Bluetooth._MyGattCallback = android.bluetooth.BluetoothGattCallback.extend({
294297
return;
295298
}
296299

297-
if(Bluetooth.characteristicLogging)
300+
if (Bluetooth.characteristicLogging) {
298301
console.log(bluetoothGattCharacteristic);
302+
}
299303

300304
if (stateObject.onWritePromise) {
301305
stateObject.onWritePromise({

bluetooth.ios.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,7 @@ var CBPeripheralDelegateImpl = (function (_super) {
204204
}
205205

206206
// now let's see if we're ready to invoke the callback
207-
// TODO wait for the last one, THEN return
208-
if (this._services.length == this._servicesWithCharacteristics.length) {
207+
if (this._services.length === this._servicesWithCharacteristics.length) {
209208
if (this._callback) {
210209
this._callback({
211210
UUID: peripheral.identifier.UUIDString,
@@ -724,8 +723,9 @@ Bluetooth.writeWithoutResponse = function (arg) {
724723

725724
var valueEncoded = Bluetooth._encodeValue(arg.value);
726725

727-
if (Bluetooth.characteristicLogging)
726+
if (Bluetooth.characteristicLogging) {
728727
console.log("Attempting to write (encoded): " + valueEncoded);
728+
}
729729

730730
wrapper.peripheral.writeValueForCharacteristicType(
731731
valueEncoded,

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
"platforms": {
99
"android": "2.3.0",
1010
"ios": "2.3.0"
11+
},
12+
"plugin": {
13+
"nan": "true",
14+
"pan": "true",
15+
"core3": "true",
16+
"category": "Processing"
1117
}
1218
},
1319
"repository": {

0 commit comments

Comments
 (0)