@mpxjs/api-proxy 2.10.16-beta.8 → 2.10.16-beta.9
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/package.json
CHANGED
|
@@ -74,8 +74,8 @@ function openBluetoothAdapter (options = {}) {
|
|
|
74
74
|
const BleManager = require('react-native-ble-manager').default
|
|
75
75
|
const { success = noop, fail = noop, complete = noop } = options
|
|
76
76
|
let bluetoothPermission = requestBluetoothPermission
|
|
77
|
-
if (
|
|
78
|
-
bluetoothPermission = mpx.rnConfig.bluetoothPermission
|
|
77
|
+
if (mpx.config?.rnConfig?.bluetoothPermission) { // 安卓需要验证权限,开放给用户可以自定义验证权限的方法
|
|
78
|
+
bluetoothPermission = mpx.config.rnConfig.bluetoothPermission
|
|
79
79
|
}
|
|
80
80
|
// 先请求权限,再初始化蓝牙管理器
|
|
81
81
|
bluetoothPermission().then((hasPermissions) => {
|
|
@@ -685,10 +685,11 @@ function getBLEDeviceCharacteristics (options = {}) {
|
|
|
685
685
|
const characteristics = characteristicsList.map(char => ({
|
|
686
686
|
uuid: char.characteristic,
|
|
687
687
|
properties: {
|
|
688
|
-
read: char.properties.Read
|
|
689
|
-
write: char.properties.Write
|
|
690
|
-
notify: char.properties.Notify
|
|
691
|
-
indicate: char.properties.Indicate
|
|
688
|
+
read: !!char.properties.Read,
|
|
689
|
+
write: !!char.properties.Write,
|
|
690
|
+
notify: !!char.properties.Notify,
|
|
691
|
+
indicate: !!char.properties.Indicate,
|
|
692
|
+
writeNoResponse: !!char.properties.writeWithoutResponse
|
|
692
693
|
}
|
|
693
694
|
}))
|
|
694
695
|
|
|
@@ -33,8 +33,8 @@ function startWifi (options = {}) {
|
|
|
33
33
|
}
|
|
34
34
|
startWifiReady = true
|
|
35
35
|
let wifiPermission = requestWifiPermission
|
|
36
|
-
if (mpx.rnConfig?.wifiPermission) {
|
|
37
|
-
wifiPermission = mpx.rnConfig.wifiPermission
|
|
36
|
+
if (mpx.config?.rnConfig?.wifiPermission) {
|
|
37
|
+
wifiPermission = mpx.config.rnConfig.wifiPermission
|
|
38
38
|
}
|
|
39
39
|
wifiPermission().then(async () => {
|
|
40
40
|
let enabled
|