react-native-gizwits-sdk-v5 1.5.0-beta.9 → 1.5.0
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 +6 -4
- package/android/src/main/java/com/gizwits/reactnativegizwitssdkv5/RNGizDeviceManagerModule.kt +5 -2
- package/ios/RNGizDeviceManagerModule.m +1 -1
- package/ios/RNGizDeviceManagerModule.swift +1 -1
- package/package.json +1 -1
- package/react-native-gizwits-sdk-v5.podspec +1 -1
package/android/build.gradle
CHANGED
|
@@ -64,11 +64,13 @@ dependencies {
|
|
|
64
64
|
implementation "androidx.startup:startup-runtime:$startup_version"
|
|
65
65
|
|
|
66
66
|
implementation 'com.github.wendykierp:JTransforms:3.1'
|
|
67
|
+
// ESPTouch
|
|
68
|
+
implementation 'com.github.EspressifApp:lib-esptouch-android:1.1.1'
|
|
67
69
|
|
|
68
|
-
implementation("io.github.gizwits:sdk:1.
|
|
69
|
-
implementation("io.github.gizwits:sdk-bluetooth:1.
|
|
70
|
-
implementation("io.github.gizwits:sdk-lan:1.
|
|
71
|
-
implementation("io.github.gizwits:sdk-mqtt:1.
|
|
70
|
+
implementation("io.github.gizwits:sdk:1.4.2")
|
|
71
|
+
implementation("io.github.gizwits:sdk-bluetooth:1.4.2")
|
|
72
|
+
implementation("io.github.gizwits:sdk-lan:1.4.2")
|
|
73
|
+
implementation("io.github.gizwits:sdk-mqtt:1.4.2")
|
|
72
74
|
// implementation files('libs/sdk-release.aar', 'libs/sdk-bluetooth-release.aar', 'libs/sdk-lan-release.aar', 'libs/sdk-mqtt-release.aar')
|
|
73
75
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlin_coroutine_version")
|
|
74
76
|
// retrofit
|
package/android/src/main/java/com/gizwits/reactnativegizwitssdkv5/RNGizDeviceManagerModule.kt
CHANGED
|
@@ -28,6 +28,7 @@ import com.google.gson.annotations.SerializedName
|
|
|
28
28
|
import kotlinx.coroutines.CoroutineScope
|
|
29
29
|
import kotlinx.coroutines.Dispatchers
|
|
30
30
|
import kotlinx.coroutines.SupervisorJob
|
|
31
|
+
import kotlinx.coroutines.cancel
|
|
31
32
|
import kotlinx.coroutines.launch
|
|
32
33
|
import org.json.JSONArray
|
|
33
34
|
import org.json.JSONObject
|
|
@@ -129,7 +130,9 @@ data class GizProvideWiFiCredentialsWithAirLinkParams(
|
|
|
129
130
|
val timeout: Long,
|
|
130
131
|
@SerializedName("productKeys")
|
|
131
132
|
val productKeys: List<String>,
|
|
132
|
-
): DeviceParams
|
|
133
|
+
): DeviceParams {
|
|
134
|
+
override val id: String = "airlink" // AirLink 配网不需要设备ID
|
|
135
|
+
}
|
|
133
136
|
|
|
134
137
|
data class GizStopProvideWiFiCredentialsParams(
|
|
135
138
|
@SerializedName("id")
|
|
@@ -300,7 +303,7 @@ class RNGizDeviceManagerModule(reactContext: ReactApplicationContext) : ReactCon
|
|
|
300
303
|
}
|
|
301
304
|
|
|
302
305
|
@ReactMethod
|
|
303
|
-
fun stopProvideWiFiCredentialsWithAirLink(
|
|
306
|
+
fun stopProvideWiFiCredentialsWithAirLink(result: Callback) {
|
|
304
307
|
moduleScope.launch {
|
|
305
308
|
val res = GizESPTouchSmartConfig.stopProvideWiFiCredentialsWithAirLink()
|
|
306
309
|
GizRNCallbackManager.callbackWithResult(callback = result, result = res)
|
|
@@ -24,7 +24,7 @@ RCT_EXTERN_METHOD(unBind:(NSDictionary *)options result:(RCTResponseSenderBlock)
|
|
|
24
24
|
RCT_EXTERN_METHOD(stopProvideWiFiCredentials:(NSDictionary *)options result:(RCTResponseSenderBlock)result)
|
|
25
25
|
RCT_EXTERN_METHOD(provideWiFiCredentials:(NSDictionary *)options result:(RCTResponseSenderBlock)result)
|
|
26
26
|
RCT_EXTERN_METHOD(provideWiFiCredentialsWithAirLink:(NSDictionary *)options result:(RCTResponseSenderBlock)result)
|
|
27
|
-
RCT_EXTERN_METHOD(stopProvideWiFiCredentialsWithAirLink:(
|
|
27
|
+
RCT_EXTERN_METHOD(stopProvideWiFiCredentialsWithAirLink:(RCTResponseSenderBlock)result)
|
|
28
28
|
|
|
29
29
|
RCT_EXTERN_METHOD(startMusicalRhythm:(NSDictionary *)options result:(RCTResponseSenderBlock)result)
|
|
30
30
|
RCT_EXTERN_METHOD(stopMusicalRhythm:(NSDictionary *)options result:(RCTResponseSenderBlock)result)
|
|
@@ -472,7 +472,7 @@ class RNGizDeviceManagerModule: RCTEventEmitter {
|
|
|
472
472
|
}
|
|
473
473
|
|
|
474
474
|
@objc
|
|
475
|
-
public func stopProvideWiFiCredentialsWithAirLink(_
|
|
475
|
+
public func stopProvideWiFiCredentialsWithAirLink(_ result: @escaping RCTResponseSenderBlock) {
|
|
476
476
|
Task {
|
|
477
477
|
var data: GizResult<Int?, GizActivatorException?>
|
|
478
478
|
data = await ESPTouchSmartConfig.sharedInstance.stopProvideWiFiCredentialsWithAirLink()
|
package/package.json
CHANGED