react-native-beidou 1.0.8 → 1.1.1

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.
Files changed (26) hide show
  1. package/BeiDouAIDLTestPage.tsx +505 -19
  2. package/LogManager.ts +4 -0
  3. package/README.md +108 -63
  4. package/android/.gradle/8.9/checksums/checksums.lock +0 -0
  5. package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
  6. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  7. package/android/.gradle/buildOutputCleanup/cache.properties +2 -2
  8. package/android/.idea/caches/deviceStreaming.xml +993 -0
  9. package/android/build.gradle +9 -9
  10. package/android/src/main/AndroidManifest.xml +2 -0
  11. package/android/src/main/java/com/fxzs.rnbeidou/BeiDouBluetoothModule.java +195 -217
  12. package/android/src/main/java/com/fxzs.rnbeidou/BeidouAidlHelper.java +643 -0
  13. package/index.ts +223 -89
  14. package/ios/BeiDouBluetoothModule.m +26 -1
  15. package/ios/BeidouBluetooth.framework/BeidouBluetooth +0 -0
  16. package/ios/BeidouBluetooth.framework/FMDB.bundle/Info.plist +0 -0
  17. package/ios/BeidouBluetooth.framework/FMDB.bundle/PrivacyInfo.xcprivacy +14 -0
  18. package/ios/BeidouBluetooth.framework/Headers/BDTLocationService.h +24 -0
  19. package/ios/BeidouBluetooth.framework/Headers/BeidouBluetooth.h +3 -1
  20. package/ios/BeidouBluetooth.framework/Info.plist +0 -0
  21. package/ios/BeidouBluetooth.framework/_CodeSignature/CodeDirectory +0 -0
  22. package/ios/BeidouBluetooth.framework/_CodeSignature/CodeRequirements-1 +0 -0
  23. package/ios/BeidouBluetooth.framework/_CodeSignature/CodeResources +49 -4
  24. package/ios/BeidouBluetooth.framework/_CodeSignature/CodeSignature +0 -0
  25. package/package.json +2 -1
  26. package/react-native-beidou.podspec +26 -0
package/README.md CHANGED
@@ -1,63 +1,108 @@
1
- # React Native 北斗蓝牙 SDK(react-native-beidou)
2
-
3
- ## 安装
4
-
5
- ```bash
6
- yarn add react-native-beidou
7
- ```
8
-
9
- ### iOS
10
-
11
- 在 `ios/Podfile` 中确保加入:
12
-
13
- ```ruby
14
- pod 'react-native-beidou', :path => '../node_modules/react-native-beidou'
15
- ```
16
-
17
- 执行:
18
-
19
- ```bash
20
- cd ios && pod install
21
- ```
22
-
23
- ---
24
-
25
- ## 权限与配置
26
-
27
- ### Android 权限(必配)
28
-
29
- 在宿主应用 `android/app/src/main/AndroidManifest.xml` 中添加(按系统版本动态申请):
30
-
31
- ```xml
32
- <!-- Android 12+ -->
33
- <uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
34
- <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
35
-
36
- <!-- Android 6.0+ 扫描需要位置权限 -->
37
- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
38
- <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
39
-
40
- <!-- WiFi 名称读取(可选) -->
41
- <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
42
-
43
- <!-- 建议配置,声明低功耗蓝牙能力 -->
44
- <uses-feature android:name="android.hardware.bluetooth_le" android:required="false" />
45
- ```
46
-
47
- 混淆(如启用 ProGuard/R8)建议保留:
48
-
49
- ```proguard
50
- -keep class com.beidou.bluetooth.** { *; }
51
- -keep class com.fxzs.rnbeidou.** { *; }
52
- ```
53
-
54
- ### iOS 权限(Info.plist)
55
-
56
- 根据实际需要添加:
57
-
58
- ```xml
59
- <key>NSBluetoothAlwaysUsageDescription</key>
60
- <string>需要使用蓝牙与北斗终端通信</string>
61
- <key>NSLocationWhenInUseUsageDescription</key>
62
- <string>用于蓝牙扫描或获取WiFi信息</string>
63
- ```
1
+ # React Native 北斗蓝牙 SDK(react-native-beidou)
2
+
3
+ ## 安装
4
+
5
+ ```bash
6
+ yarn add react-native-beidou
7
+ ```
8
+
9
+ ### iOS
10
+
11
+ 在 `ios/Podfile` 中确保加入:
12
+
13
+ ```ruby
14
+ pod 'react-native-beidou', :path => '../node_modules/react-native-beidou'
15
+ ```
16
+
17
+ 执行:
18
+
19
+ ```bash
20
+ cd ios && pod install
21
+ ```
22
+
23
+ ---
24
+
25
+ ## 权限与配置
26
+
27
+ ### Android 权限
28
+
29
+
30
+ ```xml
31
+ <!-- Android 12+ -->
32
+ <uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
33
+ <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
34
+
35
+ <!-- Android 6.0+ 扫描需要位置权限 -->
36
+ <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
37
+ <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
38
+
39
+ <!-- WiFi 名称读取(可选) -->
40
+ <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
41
+
42
+ <!-- 建议配置,声明低功耗蓝牙能力 -->
43
+ <uses-feature android:name="android.hardware.bluetooth_le" android:required="false" />
44
+ ```
45
+
46
+
47
+ ### iOS 权限
48
+
49
+
50
+ ```xml
51
+ <key>NSBluetoothAlwaysUsageDescription</key>
52
+ <string>需要使用蓝牙与北斗终端通信</string>
53
+ <key>NSLocationWhenInUseUsageDescription</key>
54
+ <string>用于蓝牙扫描或获取WiFi信息</string>
55
+ ```
56
+
57
+
58
+ ### 北斗小程序 RN 用到的所有库
59
+
60
+ ```
61
+ "dependencies": {
62
+ "@ant-design/icons-react-native": "2.3.2",
63
+ "@ant-design/react-native": "5.3.1",
64
+ "@kafudev/react-native-vconsole": "^0.1.11",
65
+ "@react-native-async-storage/async-storage": "2.0.0",
66
+ "@react-navigation/bottom-tabs": "^6.3.1",
67
+ "@react-navigation/native": "^6.0.10",
68
+ "@react-navigation/native-stack": "^6.7.0",
69
+ "@react-navigation/stack": "^6.2.1",
70
+ "@reduxjs/toolkit": "^1.8.2",
71
+ "buffer": "^6.0.3",
72
+ "cmcc-bridge-module": "file:library/cmcc-bridge-module-1.0.0.tgz",
73
+ "crypto-es": "2.1.0",
74
+ "crypto-js": "4.2.0",
75
+ "dayjs": "1.11.13",
76
+ "lodash": "4.17.21",
77
+ "node-forge": "^1.3.1",
78
+ "react": "17.0.2",
79
+ "react-native": "0.68.7",
80
+ "react-native-axios": "0.17.1",
81
+ "react-native-beidou": "1.0.8",
82
+ "react-native-contacts": "^8.0.5",
83
+ "react-native-gesture-handler": "2.14.1",
84
+ "react-native-haptic-feedback": "1.14.0",
85
+ "react-native-image-zoom-viewer": "3.0.1",
86
+ "react-native-intersection-observer": "0.2.0",
87
+ "react-native-linear-gradient": "2.8.3",
88
+ "react-native-media-console": "2.2.4",
89
+ "react-native-orientation-locker": "1.4.0",
90
+ "react-native-reanimated": "2.17.0",
91
+ "react-native-reanimated-carousel": "3.5.1",
92
+ "react-native-render-html": "6.3.4",
93
+ "react-native-root-toast": "^3.5.1",
94
+ "react-native-safe-area-context": "4.5.0",
95
+ "react-native-signature-canvas": "4.7.2",
96
+ "react-native-storage": "1.0.1",
97
+ "react-native-svg": "12.5.1",
98
+ "react-native-video": "5.2.1",
99
+ "react-native-view-shot": "3.8.0",
100
+ "react-native-webview": "13.10.2",
101
+ "react-redux": "^8.0.2",
102
+ "redux-persist": "^6.0.0",
103
+ "supercluster": "7.1.5",
104
+ "rn-keychain": "1.0.1",
105
+ "zustand": "4.5.5"
106
+ },
107
+
108
+ ```
@@ -1,2 +1,2 @@
1
- #Fri Oct 24 11:21:51 CST 2025
2
- gradle.version=8.10
1
+ #Mon Nov 17 14:26:40 CST 2025
2
+ gradle.version=8.9