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.
- package/BeiDouAIDLTestPage.tsx +7 -7
- package/Compass.android.tsx +20 -0
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +1 -1
- package/android/.idea/AndroidProjectSystem.xml +6 -0
- package/android/.idea/gradle.xml +13 -0
- package/android/.idea/migrations.xml +10 -0
- package/android/.idea/misc.xml +9 -0
- package/android/.idea/runConfigurations.xml +17 -0
- package/android/.idea/vcs.xml +6 -0
- package/android/build.gradle +3 -0
- package/android/src/main/AndroidManifest.xml +7 -0
- package/android/src/main/java/com/cmcc_rn_module/BeiDouBluetoothModule.java +343 -101
- package/android/src/main/java/com/cmcc_rn_module/BeiDouBluetoothPackage.java +4 -1
- package/android/src/main/java/com/cmcc_rn_module/ChatDBManager.java +306 -0
- package/android/src/main/java/com/cmcc_rn_module/JsonUtil.java +113 -7
- package/android/src/main/java/com/cmcc_rn_module/view/CompassManager.java +41 -0
- package/android/src/main/java/com/cmcc_rn_module/view/CompassView.java +277 -0
- package/android/src/main/libs/bluetooth-sdk.aar +0 -0
- package/index.ts +188 -10
- package/ios/BDTCompassViewManager.h +15 -0
- package/ios/BDTCompassViewManager.m +24 -0
- package/ios/BeiDouBluetoothModule.h +20 -0
- package/ios/BeiDouBluetoothModule.m +424 -0
- package/ios/BeidouBluetooth.framework/BeidouBluetooth +0 -0
- package/ios/BeidouBluetooth.framework/Headers/BDTBluetoothManager.h +76 -0
- package/ios/BeidouBluetooth.framework/Headers/BDTChatDBManager.h +41 -0
- package/ios/BeidouBluetooth.framework/Headers/BDTDataPacketBuilder.h +62 -0
- package/ios/BeidouBluetooth.framework/Headers/BeidouBluetooth.h +21 -0
- package/ios/BeidouBluetooth.framework/Info.plist +0 -0
- package/ios/BeidouBluetooth.framework/Modules/module.modulemap +6 -0
- package/ios/BeidouBluetooth.framework/_CodeSignature/CodeDirectory +0 -0
- package/ios/BeidouBluetooth.framework/_CodeSignature/CodeRequirements +0 -0
- package/ios/BeidouBluetooth.framework/_CodeSignature/CodeRequirements-1 +0 -0
- package/ios/BeidouBluetooth.framework/_CodeSignature/CodeResources +177 -0
- package/ios/BeidouBluetooth.framework/_CodeSignature/CodeSignature +0 -0
- package/ios/CompassView.h +20 -0
- package/ios/CompassView.m +201 -0
- package/package.json +2 -1
- package/android/.gradle/8.8/checksums/checksums.lock +0 -0
- package/android/.gradle/8.8/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.8/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.8/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/8.8/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.8/gc.properties +0 -0
- package/ios/Podfile +0 -79
- package/ios/build_sdk.sh +0 -30
- package/ios/cmcc_rn_module/AppDelegate.h +0 -8
- package/ios/cmcc_rn_module/AppDelegate.mm +0 -108
- package/ios/cmcc_rn_module/CMCCAssetsLoaderModule.h +0 -17
- package/ios/cmcc_rn_module/CMCCAssetsLoaderModule.m +0 -38
- package/ios/cmcc_rn_module/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
- package/ios/cmcc_rn_module/Images.xcassets/Contents.json +0 -6
- package/ios/cmcc_rn_module/Info.plist +0 -62
- package/ios/cmcc_rn_module/LaunchScreen.storyboard +0 -47
- package/ios/cmcc_rn_module/main.m +0 -10
- package/ios/cmcc_rn_module.xcodeproj/project.pbxproj +0 -708
- package/ios/cmcc_rn_module.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/ios/cmcc_rn_module.xcodeproj/xcshareddata/xcschemes/cmcc_rn_module.xcscheme +0 -88
- package/ios/cmcc_rn_module.xcworkspace/contents.xcworkspacedata +0 -10
- package/ios/cmcc_rn_module.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/ios/cmcc_rn_moduleTests/Info.plist +0 -24
- package/ios/cmcc_rn_moduleTests/cmcc_rn_moduleTests.m +0 -66
- package/ios/reset_env.sh +0 -24
- package/ios/scripts/RNReanimated.podspec +0 -90
- package/ios/scripts/generate_dynamic_pod.rb +0 -166
- package/ios/scripts/native_modules_dy.rb +0 -317
- package/ios/scripts/react_native_pods_dy.rb +0 -773
package/BeiDouAIDLTestPage.tsx
CHANGED
|
@@ -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.
|
|
45
|
-
const [actionName, setActionName] = useState('com.
|
|
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.
|
|
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.
|
|
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;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#
|
|
1
|
+
#Tue Sep 16 15:41:38 CST 2025
|
|
2
2
|
gradle.version=8.9
|
|
@@ -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,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>
|
package/android/build.gradle
CHANGED
|
@@ -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>
|