react-native-gizwits-sdk-v5 1.4.0 → 1.4.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/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.0.
|
|
67
|
-
implementation("io.github.gizwits:sdk-bluetooth:1.0.
|
|
68
|
-
implementation("io.github.gizwits:sdk-lan:1.0.
|
|
69
|
-
implementation("io.github.gizwits:sdk-mqtt:1.0.
|
|
66
|
+
implementation("io.github.gizwits:sdk:1.0.71")
|
|
67
|
+
implementation("io.github.gizwits:sdk-bluetooth:1.0.71")
|
|
68
|
+
implementation("io.github.gizwits:sdk-lan:1.0.71")
|
|
69
|
+
implementation("io.github.gizwits:sdk-mqtt:1.0.71")
|
|
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
|
package/android/src/main/java/com/gizwits/reactnativegizwitssdkv5/RNGizDeviceManagerModule.kt
CHANGED
|
@@ -198,7 +198,7 @@ class RNGizDeviceManagerModule(reactContext: ReactApplicationContext) : ReactCon
|
|
|
198
198
|
val (config, device) = RNGizParamsChecker.checkDeviceAndParams(options, result, GizBindParams::class.java)
|
|
199
199
|
if (config !=null && device !=null) {
|
|
200
200
|
CoroutineScope(Dispatchers.IO).launch {
|
|
201
|
-
val res = device.
|
|
201
|
+
val res = device.bind(config.alias, config.remark)
|
|
202
202
|
GizRNCallbackManager.callbackWithResult(callback = result, result = res)
|
|
203
203
|
if (res.isSuccess) {
|
|
204
204
|
GizSDKManager.queryBoundDevices()
|
|
@@ -212,7 +212,7 @@ class RNGizDeviceManagerModule(reactContext: ReactApplicationContext) : ReactCon
|
|
|
212
212
|
val (config, device) = RNGizParamsChecker.checkDeviceAndParams(options, result, GizUnBindParams::class.java)
|
|
213
213
|
if (config !=null && device !=null) {
|
|
214
214
|
CoroutineScope(Dispatchers.IO).launch {
|
|
215
|
-
val res = device.
|
|
215
|
+
val res = device.unBind()
|
|
216
216
|
GizRNCallbackManager.callbackWithResult(callback = result, result = res)
|
|
217
217
|
if (res.isSuccess) {
|
|
218
218
|
GizSDKManager.queryBoundDevices()
|