react-native-gizwits-sdk-v5 1.4.53 → 1.4.55
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/android/build.gradle
CHANGED
|
@@ -63,10 +63,10 @@ dependencies {
|
|
|
63
63
|
|
|
64
64
|
implementation "androidx.startup:startup-runtime:$startup_version"
|
|
65
65
|
|
|
66
|
-
implementation("io.github.gizwits:sdk:1.
|
|
67
|
-
implementation("io.github.gizwits:sdk-bluetooth:1.
|
|
68
|
-
implementation("io.github.gizwits:sdk-lan:1.
|
|
69
|
-
implementation("io.github.gizwits:sdk-mqtt:1.
|
|
66
|
+
implementation("io.github.gizwits:sdk:1.2.6")
|
|
67
|
+
implementation("io.github.gizwits:sdk-bluetooth:1.2.6")
|
|
68
|
+
implementation("io.github.gizwits:sdk-lan:1.2.6")
|
|
69
|
+
implementation("io.github.gizwits:sdk-mqtt:1.2.6")
|
|
70
70
|
// implementation files('libs/sdk-release.aar', 'libs/sdk-bluetooth-release.aar', 'libs/sdk-lan-release.aar', 'libs/sdk-mqtt-release.aar')
|
|
71
71
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlin_coroutine_version")
|
|
72
72
|
// retrofit
|
|
@@ -479,30 +479,28 @@ class RNGizDeviceManagerModule: RCTEventEmitter {
|
|
|
479
479
|
// 开始音乐律动
|
|
480
480
|
@objc
|
|
481
481
|
public func startMusicalRhythm(_ options: NSDictionary, result: @escaping RCTResponseSenderBlock) {
|
|
482
|
+
|
|
482
483
|
if let params = RNGizParamsChecker.check(options: options, result: result, paramsType: StartMusicalRhythmParams.self) {
|
|
483
484
|
// 先找到设备
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
485
|
+
|
|
486
|
+
if let device = self.findDevice(id: params.id) {
|
|
487
|
+
let res = device.startMusicalRhythm(sensitivity: params.sensitivity, mode: params.mode) { [params] data in
|
|
488
|
+
if (params.needMonitor) {
|
|
488
489
|
let data = [
|
|
489
|
-
"deviceID":
|
|
490
|
+
"deviceID": params.id,
|
|
490
491
|
"data": GizRNCallbackManager.convertToDictionary(object: data) as Any
|
|
491
492
|
] as [String : Any]
|
|
492
|
-
sendEvent(withName: "GizMusicalRhythmEvnet", body: data)
|
|
493
|
+
self.sendEvent(withName: "GizMusicalRhythmEvnet", body: data)
|
|
493
494
|
}
|
|
494
|
-
|
|
495
|
-
var realCallback = params.needMonitor ? progressHandler : nil
|
|
496
|
-
var res = device.startMusicalRhythm(sensitivity: params.sensitivity, mode: params.mode, callback: realCallback)
|
|
497
|
-
GizRNCallbackManager.callbackWithResult(callback: result, result:GizResult<Int?, GizAPIException?>(successMessage: "", data: nil))
|
|
498
|
-
|
|
499
495
|
}
|
|
496
|
+
GizRNCallbackManager.callbackWithResult(callback: result, result:GizResult<Int?, GizAPIException?>(successMessage: "", data: nil))
|
|
500
497
|
} else {
|
|
501
498
|
// 提示设备不存在
|
|
502
499
|
GizRNCallbackManager.callbackWithResult(callback: result, result: GizResult<Int?, GizAPIException?>(error: GizAPIException.GIZ_OPENAPI_DEVICE_NOT_FOUND))
|
|
503
500
|
}
|
|
504
501
|
|
|
505
502
|
}
|
|
503
|
+
|
|
506
504
|
}
|
|
507
505
|
@objc
|
|
508
506
|
public func stopMusicalRhythm(_ options: NSDictionary, result: @escaping RCTResponseSenderBlock) {
|
package/package.json
CHANGED