react-native-gizwits-sdk-v5 1.2.0 → 1.2.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 +20 -5
- package/android/libs/sdk-bluetooth-release.aar +0 -0
- package/android/libs/sdk-lan-release.aar +0 -0
- package/android/libs/sdk-mqtt-release.aar +0 -0
- package/android/libs/sdk-release.aar +0 -0
- package/android/src/main/AndroidManifest.xml +30 -1
- package/android/src/main/java/com/gizwits/reactnativegizwitssdkv5/RNGizSDKManagerModule.kt +19 -3
- package/android/src/main/java/com/gizwits/reactnativegizwitssdkv5/RNGizSDKManagerPackage.kt +2 -1
- package/ios/GizwitsiOSSDK.framework/GizwitsiOSSDK +0 -0
- package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/arm64-apple-ios.swiftmodule +0 -0
- package/ios/RNGizDeviceManagerModule.swift +1 -1
- package/package.json +1 -1
package/android/build.gradle
CHANGED
|
@@ -10,7 +10,7 @@ buildscript {
|
|
|
10
10
|
|
|
11
11
|
dependencies {
|
|
12
12
|
classpath 'com.android.tools.build:gradle:7.0.4'
|
|
13
|
-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet('kotlinVersion', '1.
|
|
13
|
+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet('kotlinVersion', '1.8.0')}"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -22,12 +22,21 @@ apply plugin: 'com.android.library'
|
|
|
22
22
|
apply plugin: 'kotlin-android'
|
|
23
23
|
|
|
24
24
|
android {
|
|
25
|
-
compileSdkVersion safeExtGet('compileSdkVersion',
|
|
26
|
-
buildToolsVersion safeExtGet('buildToolsVersion', '
|
|
25
|
+
compileSdkVersion safeExtGet('compileSdkVersion', 33)
|
|
26
|
+
buildToolsVersion safeExtGet('buildToolsVersion', '33.0.0')
|
|
27
27
|
|
|
28
28
|
defaultConfig {
|
|
29
29
|
minSdkVersion safeExtGet('minSdkVersion', 21)
|
|
30
|
-
targetSdkVersion safeExtGet('targetSdkVersion',
|
|
30
|
+
targetSdkVersion safeExtGet('targetSdkVersion', 33)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
compileOptions {
|
|
34
|
+
sourceCompatibility JavaVersion.VERSION_17
|
|
35
|
+
targetCompatibility JavaVersion.VERSION_17
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
kotlinOptions {
|
|
39
|
+
jvmTarget = '17'
|
|
31
40
|
}
|
|
32
41
|
}
|
|
33
42
|
|
|
@@ -39,4 +48,10 @@ repositories {
|
|
|
39
48
|
dependencies {
|
|
40
49
|
//noinspection GradleDynamicVersion
|
|
41
50
|
implementation 'com.facebook.react:react-native:+'
|
|
42
|
-
|
|
51
|
+
|
|
52
|
+
implementation 'io.sentry:sentry-android-timber:6.29.0'
|
|
53
|
+
implementation 'com.jakewharton.timber:timber:5.0.1'
|
|
54
|
+
implementation 'io.sentry:sentry-android:6.29.0'
|
|
55
|
+
|
|
56
|
+
compileOnly files('libs/sdk-release.aar', 'libs/sdk-bluetooth-release.aar', 'libs/sdk-lan-release.aar', 'libs/sdk-mqtt-release.aar')
|
|
57
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +1,31 @@
|
|
|
1
1
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
2
|
-
package="com.
|
|
2
|
+
package="com.gizwitsrn.reactnativegizwitssdkv5" xmlns:tools="http://schemas.android.com/tools">
|
|
3
|
+
|
|
4
|
+
<uses-permission android:name="android.permission.INTERNET"/>
|
|
5
|
+
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
|
6
|
+
<uses-permission
|
|
7
|
+
android:name="android.permission.BLUETOOTH"
|
|
8
|
+
android:maxSdkVersion="30"/>
|
|
9
|
+
<uses-permission
|
|
10
|
+
android:name="android.permission.BLUETOOTH_ADMIN"
|
|
11
|
+
android:maxSdkVersion="30"/>
|
|
12
|
+
<uses-permission
|
|
13
|
+
android:name="android.permission.ACCESS_FINE_LOCATION"
|
|
14
|
+
android:maxSdkVersion="30"/>
|
|
15
|
+
<uses-permission
|
|
16
|
+
android:name="android.permission.ACCESS_COARSE_LOCATION"
|
|
17
|
+
android:maxSdkVersion="30"/>
|
|
18
|
+
<uses-permission
|
|
19
|
+
android:name="android.permission.BLUETOOTH_SCAN"
|
|
20
|
+
android:usesPermissionFlags="neverForLocation"
|
|
21
|
+
tools:targetApi="s" />
|
|
22
|
+
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
|
|
23
|
+
<meta-data
|
|
24
|
+
android:name="io.sentry.auto-init"
|
|
25
|
+
android:value="false" />
|
|
26
|
+
<application>
|
|
27
|
+
<meta-data
|
|
28
|
+
android:name="io.sentry.auto-init"
|
|
29
|
+
android:value="false" />
|
|
30
|
+
</application>
|
|
31
|
+
</manifest>
|
|
@@ -1,13 +1,29 @@
|
|
|
1
|
-
package com.
|
|
1
|
+
package com.gizwitsrn.reactnativegizwitssdkv5
|
|
2
2
|
|
|
3
|
+
import com.facebook.react.bridge.Callback
|
|
3
4
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
4
5
|
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
|
6
|
+
import com.facebook.react.bridge.ReactMethod
|
|
7
|
+
import com.facebook.react.bridge.ReadableMap
|
|
8
|
+
import com.gizwits.smart.sdk.GizSDKManager
|
|
9
|
+
import com.gizwits.smart.sdk.common.GizConfiguration
|
|
10
|
+
import com.gizwits.smart.sdk.common.ProductInfoStruct
|
|
5
11
|
|
|
6
12
|
class RNGizSDKManagerModule(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {
|
|
7
13
|
|
|
8
14
|
override fun getName() = "RNGizSDKManagerModule"
|
|
9
15
|
|
|
10
|
-
|
|
11
|
-
|
|
16
|
+
@ReactMethod
|
|
17
|
+
fun initSDK(params: ReadableMap, callback: Callback) {
|
|
18
|
+
GizSDKManager.initSDK(
|
|
19
|
+
GizConfiguration(
|
|
20
|
+
appId = "8f187b1deb9e44b6aa1374b8f13bccb1",
|
|
21
|
+
appSecret = "d73fa6d6d7c04d37b6b2cc13a18a9f37",
|
|
22
|
+
productInfoList = listOf(
|
|
23
|
+
ProductInfoStruct("f0ca03ad778543148e0f0e52a5513ef4","70671689c3644716aa6dc581a738315a"),
|
|
24
|
+
),
|
|
25
|
+
serverInfo = null
|
|
26
|
+
)
|
|
27
|
+
)
|
|
12
28
|
}
|
|
13
29
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
package com.
|
|
1
|
+
package com.gizwitsrn.reactnativegizwitssdkv5
|
|
2
2
|
|
|
3
3
|
import com.facebook.react.ReactPackage
|
|
4
4
|
import com.facebook.react.bridge.NativeModule
|
|
5
5
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
6
6
|
import com.facebook.react.uimanager.ViewManager
|
|
7
|
+
import kotlin.collections.mutableListOf
|
|
7
8
|
|
|
8
9
|
class RNGizSDKManagerPackage : ReactPackage {
|
|
9
10
|
|
|
Binary file
|
|
Binary file
|
package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/arm64-apple-ios.swiftdoc
CHANGED
|
Binary file
|
package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/arm64-apple-ios.swiftmodule
CHANGED
|
Binary file
|
|
@@ -154,7 +154,7 @@ class RNGizDeviceManagerModule: RCTEventEmitter {
|
|
|
154
154
|
// 推送数据到 GizOTAProgressEvent
|
|
155
155
|
let data = [
|
|
156
156
|
"device": GizRNCallbackManager.convertToDictionary(object: device) ?? [:],
|
|
157
|
-
"
|
|
157
|
+
"data": GizRNCallbackManager.convertToDictionary(object: event) as Any
|
|
158
158
|
] as [String : Any]
|
|
159
159
|
sendEvent(withName: "GizOTAProgressEvent", body: data)
|
|
160
160
|
}
|