react-native-beidou 1.0.6 → 1.0.7
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 +11 -3
- package/index.ts +2 -2
- package/package.json +1 -1
- package/android/src/main/libs/bluetooth-sdk.aar +0 -0
package/android/build.gradle
CHANGED
|
@@ -46,12 +46,20 @@ repositories {
|
|
|
46
46
|
google()
|
|
47
47
|
mavenCentral()
|
|
48
48
|
maven { url 'https://www.jitpack.io' }
|
|
49
|
+
maven {
|
|
50
|
+
url "http://10.18.1.5:8081/repository/maven-releases/"
|
|
51
|
+
allowInsecureProtocol = true // 如果私服是HTTP而非HTTPS,需要此配置
|
|
52
|
+
credentials {
|
|
53
|
+
username = "admin" // 如果需要认证
|
|
54
|
+
password = "ZTUz-Yjg0OGRm"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
49
57
|
}
|
|
50
58
|
|
|
51
59
|
dependencies {
|
|
52
60
|
//noinspection GradleDynamicVersion
|
|
53
61
|
implementation "com.facebook.react:react-native:${_reactNativeVersion}"
|
|
54
|
-
|
|
62
|
+
implementation 'com.fxzs:beidousdk:1.0.0@aar' // 关键:添加 @aar 后缀
|
|
55
63
|
// Add local AAR files
|
|
56
|
-
|
|
57
|
-
}
|
|
64
|
+
// implementation fileTree(dir: "src/main/libs", include: ["*.jar", "*.aar"])
|
|
65
|
+
}
|
package/index.ts
CHANGED
|
@@ -361,8 +361,8 @@ export const BeiDouModule = {
|
|
|
361
361
|
getDevices: getDiscoveredDevicesArray,
|
|
362
362
|
connect: (deviceNo: string) => BeiDouBluetoothModule.connectToDeviceFromCloudDeviceNO(deviceNo, 0),
|
|
363
363
|
disconnect: (deviceNo: string) => BeiDouBluetoothModule.disConnectWithDeviceUUID(deviceNo),
|
|
364
|
-
writeData: (randomString: string, deviceNo: string, command: number, attrType: number,
|
|
365
|
-
BeiDouBluetoothModule.writeData(randomString, deviceNo, command, attrType,
|
|
364
|
+
writeData: (randomString: string, deviceNo: string, command: number, attrType: number, callback: (result: number) => void) =>
|
|
365
|
+
BeiDouBluetoothModule.writeData(randomString, deviceNo, command, attrType, callback),
|
|
366
366
|
writeInfo: writeInfoToDevice,
|
|
367
367
|
generateRandomString: () => BeiDouBluetoothModule.generateRandom16BytesString(),
|
|
368
368
|
setBLEKey: setBeiDouBLEKey,
|
package/package.json
CHANGED
|
Binary file
|