react-native-beidou 1.0.3 → 1.0.4

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 (70) hide show
  1. package/BeiDouAIDLTestPage.tsx +7 -7
  2. package/Compass.android.tsx +20 -0
  3. package/android/.gradle/8.9/checksums/checksums.lock +0 -0
  4. package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
  5. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  6. package/android/.gradle/buildOutputCleanup/cache.properties +1 -1
  7. package/android/.idea/AndroidProjectSystem.xml +6 -0
  8. package/android/.idea/gradle.xml +13 -0
  9. package/android/.idea/migrations.xml +10 -0
  10. package/android/.idea/misc.xml +9 -0
  11. package/android/.idea/runConfigurations.xml +17 -0
  12. package/android/.idea/vcs.xml +6 -0
  13. package/android/build.gradle +3 -0
  14. package/android/src/main/AndroidManifest.xml +7 -0
  15. package/android/src/main/java/com/cmcc_rn_module/BeiDouBluetoothModule.java +343 -101
  16. package/android/src/main/java/com/cmcc_rn_module/BeiDouBluetoothPackage.java +4 -1
  17. package/android/src/main/java/com/cmcc_rn_module/ChatDBManager.java +306 -0
  18. package/android/src/main/java/com/cmcc_rn_module/JsonUtil.java +113 -7
  19. package/android/src/main/java/com/cmcc_rn_module/view/CompassManager.java +41 -0
  20. package/android/src/main/java/com/cmcc_rn_module/view/CompassView.java +277 -0
  21. package/android/src/main/libs/bluetooth-sdk.aar +0 -0
  22. package/index.ts +188 -10
  23. package/ios/BDTCompassViewManager.h +15 -0
  24. package/ios/BDTCompassViewManager.m +24 -0
  25. package/ios/BeiDouBluetoothModule.h +20 -0
  26. package/ios/BeiDouBluetoothModule.m +424 -0
  27. package/ios/BeidouBluetooth.framework/BeidouBluetooth +0 -0
  28. package/ios/BeidouBluetooth.framework/Headers/BDTBluetoothManager.h +76 -0
  29. package/ios/BeidouBluetooth.framework/Headers/BDTChatDBManager.h +41 -0
  30. package/ios/BeidouBluetooth.framework/Headers/BDTDataPacketBuilder.h +62 -0
  31. package/ios/BeidouBluetooth.framework/Headers/BeidouBluetooth.h +21 -0
  32. package/ios/BeidouBluetooth.framework/Info.plist +0 -0
  33. package/ios/BeidouBluetooth.framework/Modules/module.modulemap +6 -0
  34. package/ios/BeidouBluetooth.framework/_CodeSignature/CodeDirectory +0 -0
  35. package/ios/BeidouBluetooth.framework/_CodeSignature/CodeRequirements +0 -0
  36. package/ios/BeidouBluetooth.framework/_CodeSignature/CodeRequirements-1 +0 -0
  37. package/ios/BeidouBluetooth.framework/_CodeSignature/CodeResources +177 -0
  38. package/ios/BeidouBluetooth.framework/_CodeSignature/CodeSignature +0 -0
  39. package/ios/CompassView.h +20 -0
  40. package/ios/CompassView.m +201 -0
  41. package/package.json +2 -1
  42. package/android/.gradle/8.8/checksums/checksums.lock +0 -0
  43. package/android/.gradle/8.8/dependencies-accessors/gc.properties +0 -0
  44. package/android/.gradle/8.8/fileChanges/last-build.bin +0 -0
  45. package/android/.gradle/8.8/fileHashes/fileHashes.bin +0 -0
  46. package/android/.gradle/8.8/fileHashes/fileHashes.lock +0 -0
  47. package/android/.gradle/8.8/gc.properties +0 -0
  48. package/ios/Podfile +0 -79
  49. package/ios/build_sdk.sh +0 -30
  50. package/ios/cmcc_rn_module/AppDelegate.h +0 -8
  51. package/ios/cmcc_rn_module/AppDelegate.mm +0 -108
  52. package/ios/cmcc_rn_module/CMCCAssetsLoaderModule.h +0 -17
  53. package/ios/cmcc_rn_module/CMCCAssetsLoaderModule.m +0 -38
  54. package/ios/cmcc_rn_module/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
  55. package/ios/cmcc_rn_module/Images.xcassets/Contents.json +0 -6
  56. package/ios/cmcc_rn_module/Info.plist +0 -62
  57. package/ios/cmcc_rn_module/LaunchScreen.storyboard +0 -47
  58. package/ios/cmcc_rn_module/main.m +0 -10
  59. package/ios/cmcc_rn_module.xcodeproj/project.pbxproj +0 -708
  60. package/ios/cmcc_rn_module.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  61. package/ios/cmcc_rn_module.xcodeproj/xcshareddata/xcschemes/cmcc_rn_module.xcscheme +0 -88
  62. package/ios/cmcc_rn_module.xcworkspace/contents.xcworkspacedata +0 -10
  63. package/ios/cmcc_rn_module.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  64. package/ios/cmcc_rn_moduleTests/Info.plist +0 -24
  65. package/ios/cmcc_rn_moduleTests/cmcc_rn_moduleTests.m +0 -66
  66. package/ios/reset_env.sh +0 -24
  67. package/ios/scripts/RNReanimated.podspec +0 -90
  68. package/ios/scripts/generate_dynamic_pod.rb +0 -166
  69. package/ios/scripts/native_modules_dy.rb +0 -317
  70. package/ios/scripts/react_native_pods_dy.rb +0 -773
@@ -39,10 +39,10 @@ const BeiDouAIDLTestPage: React.FC = () => {
39
39
  const [ephemerisType, setEphemerisType] = useState('GPS');
40
40
  const [ephemerisVersion, setEphemerisVersion] = useState('1.0.0');
41
41
  const [decryptMsg, setDecryptMsg] = useState('1,2,3,4,5');
42
-
42
+
43
43
  // 服务配置参数
44
- const [packageName, setPackageName] = useState('com.satnav.beidouservice');
45
- const [actionName, setActionName] = useState('com.satnav.beidouservice.IBeidouMsgAidlInterface');
44
+ const [packageName, setPackageName] = useState('com.test.aidlsetvicetest');
45
+ const [actionName, setActionName] = useState('com.samsung.beidoupackage.BeidouMsgAidlService');
46
46
 
47
47
  const addTestResult = (method: string, success: boolean, result?: any, error?: string) => {
48
48
  const newResult: TestResult = {
@@ -67,7 +67,7 @@ const BeiDouAIDLTestPage: React.FC = () => {
67
67
  Alert.alert('错误', '请输入有效的包名和Action名');
68
68
  return;
69
69
  }
70
-
70
+
71
71
  const result = await BeiDouModule.beidou.bindService(packageName.trim(), actionName.trim());
72
72
  setIsServiceBound(result);
73
73
  addTestResult('bindService', result, { packageName: packageName.trim(), actionName: actionName.trim(), result });
@@ -306,14 +306,14 @@ const BeiDouAIDLTestPage: React.FC = () => {
306
306
  {/* 服务配置区域 */}
307
307
  <View style={styles.inputSection}>
308
308
  <Text style={styles.sectionTitle}>服务配置</Text>
309
-
309
+
310
310
  <View style={styles.inputGroup}>
311
311
  <Text style={styles.inputLabel}>包名 (Package Name):</Text>
312
312
  <TextInput
313
313
  style={styles.textInput}
314
314
  value={packageName}
315
315
  onChangeText={setPackageName}
316
- placeholder="com.satnav.beidouservice"
316
+ placeholder="com.test.aidlsetvicetest"
317
317
  />
318
318
  </View>
319
319
 
@@ -323,7 +323,7 @@ const BeiDouAIDLTestPage: React.FC = () => {
323
323
  style={styles.textInput}
324
324
  value={actionName}
325
325
  onChangeText={setActionName}
326
- placeholder="com.satnav.beidouservice.IBeidouMsgAidlInterface"
326
+ placeholder="com.samsung.beidoupackage.BeidouMsgAidlService"
327
327
  />
328
328
  </View>
329
329
  </View>
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import {requireNativeComponent, NativeEventEmitter, NativeModules, ViewStyle} from 'react-native';
3
+ const CompassManager = NativeModules.CompassManager;
4
+ const CompassView = requireNativeComponent('CompassView');
5
+
6
+ const CompassAndroid = ({ style, onHeadingChange }:{
7
+ style: ViewStyle;
8
+ onHeadingChange: (r:string)=>void
9
+ }) => {
10
+ const eventEmitter = new NativeEventEmitter(CompassManager);
11
+
12
+ React.useEffect(() => {
13
+ const subscription = eventEmitter.addListener('onCompassUpdate', onHeadingChange);
14
+ return () => subscription.remove();
15
+ }, [onHeadingChange]);
16
+
17
+ return <CompassView style={style} />;
18
+ };
19
+
20
+ export default CompassAndroid;
@@ -1,2 +1,2 @@
1
- #Fri Aug 15 17:28:01 CST 2025
1
+ #Tue Sep 16 15:41:38 CST 2025
2
2
  gradle.version=8.9
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="AndroidProjectSystem">
4
+ <option name="providerId" value="com.android.tools.idea.GradleProjectSystem" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,13 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="GradleMigrationSettings" migrationVersion="1" />
4
+ <component name="GradleSettings">
5
+ <option name="linkedExternalProjectsSettings">
6
+ <GradleProjectSettings>
7
+ <option name="testRunner" value="CHOOSE_PER_TEST" />
8
+ <option name="externalProjectPath" value="$PROJECT_DIR$" />
9
+ <option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
10
+ </GradleProjectSettings>
11
+ </option>
12
+ </component>
13
+ </project>
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectMigrations">
4
+ <option name="MigrateToGradleLocalJavaHome">
5
+ <set>
6
+ <option value="$PROJECT_DIR$" />
7
+ </set>
8
+ </option>
9
+ </component>
10
+ </project>
@@ -0,0 +1,9 @@
1
+ <project version="4">
2
+ <component name="ExternalStorageConfigurationManager" enabled="true" />
3
+ <component name="ProjectRootManager">
4
+ <output url="file://$PROJECT_DIR$/build/classes" />
5
+ </component>
6
+ <component name="ProjectType">
7
+ <option name="id" value="Android" />
8
+ </component>
9
+ </project>
@@ -0,0 +1,17 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="RunConfigurationProducerService">
4
+ <option name="ignoredProducers">
5
+ <set>
6
+ <option value="com.intellij.execution.junit.AbstractAllInDirectoryConfigurationProducer" />
7
+ <option value="com.intellij.execution.junit.AllInPackageConfigurationProducer" />
8
+ <option value="com.intellij.execution.junit.PatternConfigurationProducer" />
9
+ <option value="com.intellij.execution.junit.TestInClassConfigurationProducer" />
10
+ <option value="com.intellij.execution.junit.UniqueIdConfigurationProducer" />
11
+ <option value="com.intellij.execution.junit.testDiscovery.JUnitTestDiscoveryConfigurationProducer" />
12
+ <option value="org.jetbrains.kotlin.idea.junit.KotlinJUnitRunConfigurationProducer" />
13
+ <option value="org.jetbrains.kotlin.idea.junit.KotlinPatternConfigurationProducer" />
14
+ </set>
15
+ </option>
16
+ </component>
17
+ </project>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
5
+ </component>
6
+ </project>
@@ -37,6 +37,9 @@ android {
37
37
  sourceCompatibility JavaVersion.VERSION_1_8
38
38
  targetCompatibility JavaVersion.VERSION_1_8
39
39
  }
40
+ buildFeatures {
41
+ aidl = true
42
+ }
40
43
  }
41
44
 
42
45
  repositories {
@@ -0,0 +1,7 @@
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
+ package="com.cmcc_rn_module">
3
+ <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
4
+ <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
5
+ <!-- Android 10+ 建議聲明後台定位,如不需要可去除 -->
6
+ <!-- <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> -->
7
+ </manifest>