react-native-gizwits-sdk-v5 1.3.94 → 1.3.96

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 CHANGED
@@ -0,0 +1,58 @@
1
+ import { Tabs, Tab, Callout } from 'nextra/components'
2
+
3
+ # API 文档
4
+
5
+ [API文档](https://sdkdoc.gizwits.com/rn/basic)
6
+
7
+ # 基本概念
8
+
9
+ ## 设备对象
10
+ 根据通讯方式来区分,模组有以下几种通讯方式
11
+
12
+ * 蓝牙
13
+ * 局域网
14
+ * mqtt
15
+
16
+ 对应的,在SDK,设备就衍生出了三种能力
17
+
18
+ * bleCapability
19
+ * lanCapability
20
+ * mqttCapability
21
+
22
+ <img style={{maxWidth: '400px'}} src='https://goms-1251025085.cos.ap-guangzhou.myqcloud.com/gizwits_docs/tuozhan.png' alt=""/>
23
+
24
+ 这三个能力都继承于 GizBaseCapability,都实现了控制、连接等功能。在开发的过程中您可以自由的选择连接某个通道,对某个通道下发指令。
25
+
26
+ ```javascript
27
+ // ble
28
+ await device.bleCapability.connect()
29
+ device.bleCapability.getDp()
30
+
31
+ // mqtt
32
+ await device.mqttCapability.connect()
33
+ device.mqttCapability.getDp()
34
+ ```
35
+
36
+ ## 连接的云服务
37
+ 初始化sdk的时候,您可以手动选择连接的云
38
+ * api.gizwits.com 大陆
39
+ * euapi.gizwits.com 欧洲地区
40
+ * usapi.gizwits.com 美东地区
41
+ ```javascript
42
+ import RNGizSDKManagerModule from 'react-native-gizwits-sdk-v5';
43
+ let data = await RNGizSDKManagerModule.initSDK({
44
+ appID: 'xxx',
45
+ appSecret: 'xxx',
46
+ productInfos: [
47
+ {
48
+ productKey: 'xxx',
49
+ productSecret: 'xxx',
50
+ },
51
+ ],
52
+ serverInfo: {
53
+ openAPIInfo: "api.gizwits.com"
54
+ }
55
+ });
56
+ ```
57
+
58
+ 如果不填写,将会按照客户端所在的地区自动选择
@@ -39,14 +39,14 @@ android {
39
39
  targetSdkVersion safeExtGet('targetSdkVersion', 34)
40
40
  }
41
41
 
42
- compileOptions {
43
- sourceCompatibility JavaVersion.VERSION_11
44
- targetCompatibility JavaVersion.VERSION_11
45
- }
46
-
47
- kotlinOptions {
48
- jvmTarget = '11'
49
- }
42
+ // compileOptions {
43
+ // sourceCompatibility JavaVersion.VERSION_11
44
+ // targetCompatibility JavaVersion.VERSION_11
45
+ // }
46
+
47
+ // kotlinOptions {
48
+ // jvmTarget = '11'
49
+ // }
50
50
  }
51
51
 
52
52
  repositories {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-gizwits-sdk-v5",
3
- "version": "1.3.94",
3
+ "version": "1.3.96",
4
4
  "description": "Gizwits",
5
5
  "homepage": "https://github.com/demchenkoalex/react-native-gizwits-sdk-v5#readme",
6
6
  "main": "lib/index.js",