@iotize/device-com-ble.cordova 3.6.0 → 3.6.2-alpha.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/README.md +174 -174
- package/bundles/iotize-device-com-ble.cordova.umd.js +19 -0
- package/bundles/iotize-device-com-ble.cordova.umd.js.map +1 -1
- package/bundles/iotize-device-com-ble.cordova.umd.min.js +1 -1
- package/bundles/iotize-device-com-ble.cordova.umd.min.js.map +1 -1
- package/esm2015/iotize-device-com-ble.cordova.ngsummary.json +1 -1
- package/esm2015/lib/ble-com-protocol.js.map +1 -1
- package/esm2015/lib/cordova-ble-error.js.map +1 -1
- package/esm2015/lib/cordova-interface.js.map +1 -1
- package/esm2015/lib/cordova-service-adapter.js.map +1 -1
- package/esm2015/lib/definitions.js.map +1 -1
- package/esm2015/lib/iotize-ble-cordova-plugin.js.map +1 -1
- package/esm2015/lib/logger.js.map +1 -1
- package/esm2015/lib/scanner.js.map +1 -1
- package/esm2015/lib/utility.js +18 -0
- package/esm2015/lib/utility.js.map +1 -1
- package/esm2015/lib/utility.metadata.json +1 -1
- package/esm2015/lib/utility.ngsummary.json +1 -1
- package/esm2015/public_api.js +1 -1
- package/esm2015/public_api.js.map +1 -1
- package/esm2015/public_api.metadata.json +1 -1
- package/esm2015/public_api.ngsummary.json +1 -1
- package/fesm2015/iotize-device-com-ble.cordova.js +19 -1
- package/fesm2015/iotize-device-com-ble.cordova.js.map +1 -1
- package/iotize-device-com-ble.cordova.metadata.json +1 -1
- package/lib/definitions.d.ts +2 -0
- package/lib/utility.d.ts +4 -0
- package/package.json +1 -1
- package/plugin.xml +68 -68
- package/public_api.d.ts +1 -1
- package/src/android/.gradle/4.8.1/fileHashes/fileHashes.bin +0 -0
- package/src/android/.gradle/4.8.1/fileHashes/fileHashes.lock +0 -0
- package/src/android/src/ble/BLECom.java +5 -3
- package/src/android/src/ble/BLEProtocol.java +874 -0
- package/src/android/src/ble/PluginResponse.java +1 -1
- package/src/android/src/ble/characteristics/AbstractLwM2MRequestCharacteristic.java +48 -0
- package/src/android/src/ble/characteristics/CharacteristicAdapter.java +221 -0
- package/src/android/src/ble/characteristics/CharacteristicAdapterCallbacks.java +21 -0
- package/src/android/src/ble/characteristics/LwM2M20BytesRequestCharacteristicAdapter.java +161 -0
- package/src/android/src/ble/characteristics/LwM2MMTURequestCharacteristicAdapter.java +134 -0
- package/src/android/src/ble/commands/BLECommand.java +18 -0
- package/src/android/src/ble/commands/CharacteristicOperationCompletedNotifier.java +38 -0
- package/src/android/src/ble/commands/CommandCompletedNotifier.java +10 -0
- package/src/android/src/ble/commands/DescriptorOperationCompletedNotifier.java +37 -0
- package/src/android/src/ble/commands/GattOperationCompletedNotifier.java +29 -0
- package/src/ios/BLECom.swift +732 -732
- package/src/windows/iotize-ble-com.js +159 -159
- package/www/plugin.js +1 -1
- package/iotize-device-com-ble.cordova-3.6.0.tgz +0 -0
- package/src/android/.gradle/6.8.2/fileHashes/fileHashes.lock +0 -0
- package/src/android/.gradle/6.8.2/gc.properties +0 -0
- package/src/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/src/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/src/android/.gradle/checksums/checksums.lock +0 -0
- package/src/android/.gradle/configuration-cache/gc.properties +0 -0
- package/src/android/.gradle/vcs-1/gc.properties +0 -0
- package/src/android/.gradle/vcsWorkingDirs/gc.properties +0 -0
- package/src/android/.idea/android.iml +0 -9
- package/src/android/.idea/gradle.xml +0 -16
- package/src/android/.idea/modules.xml +0 -8
- package/src/android/.idea/vcs.xml +0 -6
- package/src/windows/IoTizeBLE.pdb +0 -0
- package/src/windows/IoTizeBLE.pri +0 -0
- /package/src/android/.gradle/{6.8.2 → 4.8.1}/fileChanges/last-build.bin +0 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
package com.iotize.plugin.cordova.ble.commands;
|
|
2
|
+
|
|
3
|
+
import android.bluetooth.BluetoothGattDescriptor;
|
|
4
|
+
|
|
5
|
+
import androidx.annotation.NonNull;
|
|
6
|
+
import androidx.annotation.Nullable;
|
|
7
|
+
|
|
8
|
+
import com.iotize.android.communication.protocol.ble.BLECommandRunnable;
|
|
9
|
+
import com.iotize.plugin.cordova.ble.characteristics.CharacteristicAdapter;
|
|
10
|
+
|
|
11
|
+
public class DescriptorOperationCompletedNotifier implements CommandCompletedNotifier {
|
|
12
|
+
|
|
13
|
+
@NonNull
|
|
14
|
+
public final BluetoothGattDescriptor descriptor;
|
|
15
|
+
|
|
16
|
+
@Nullable
|
|
17
|
+
public final CharacteristicAdapter.OnDescriptorOperationResult callback;
|
|
18
|
+
|
|
19
|
+
public DescriptorOperationCompletedNotifier(@Nullable CharacteristicAdapter.OnDescriptorOperationResult callback,
|
|
20
|
+
@NonNull BluetoothGattDescriptor descriptor) {
|
|
21
|
+
this.callback = callback;
|
|
22
|
+
this.descriptor = descriptor;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
public void notifyResult(int status) {
|
|
26
|
+
if (this.callback != null) {
|
|
27
|
+
this.callback.onResult(this.descriptor, status);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
public void notifyError(@NonNull Exception err) {
|
|
32
|
+
if (this.callback != null) {
|
|
33
|
+
this.callback.onError(this.descriptor, err);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
package com.iotize.plugin.cordova.ble.commands;
|
|
2
|
+
|
|
3
|
+
import androidx.annotation.NonNull;
|
|
4
|
+
import androidx.annotation.Nullable;
|
|
5
|
+
|
|
6
|
+
import com.iotize.android.communication.protocol.ble.BLEProtocol;
|
|
7
|
+
|
|
8
|
+
public class GattOperationCompletedNotifier implements CommandCompletedNotifier {
|
|
9
|
+
|
|
10
|
+
@Nullable
|
|
11
|
+
public final BLEProtocol.OnGattOperationCallback callback;
|
|
12
|
+
|
|
13
|
+
public GattOperationCompletedNotifier(@Nullable BLEProtocol.OnGattOperationCallback callback) {
|
|
14
|
+
this.callback = callback;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
public void notifyResult(int status) {
|
|
18
|
+
if (this.callback != null) {
|
|
19
|
+
this.callback.onResult(status);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
public void notifyError(@NonNull Exception err) {
|
|
24
|
+
if (this.callback != null) {
|
|
25
|
+
this.callback.onError(err);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
}
|