更新ios蓝牙权限
This commit is contained in:
@@ -62,7 +62,24 @@ class WebviewTestController extends GetControllerEx<WebviewTestModel> {
|
||||
);
|
||||
try {
|
||||
web.jsbridge!.bind((bridge) {
|
||||
var minible = Minibleapp(bridge: bridge);
|
||||
var minible = Minibleapp(
|
||||
bridge: bridge,
|
||||
onConnect: (args1, args2) {
|
||||
final devices = args1.devices as Map<String, dynamic>;
|
||||
final mac = args2 as String;
|
||||
|
||||
// 找出对应设备
|
||||
final device = devices[mac];
|
||||
|
||||
if (device != null) {
|
||||
ef.log('Minibleapp connected: $mac -> $device');
|
||||
return device;
|
||||
} else {
|
||||
ef.log('Minibleapp connected: $mac not found in devices');
|
||||
return null;
|
||||
}
|
||||
},
|
||||
);
|
||||
// ef.kvroot.devicelist.listen((x) {});
|
||||
bridge.sdk.updateDeviceRoute((args) async {
|
||||
ef.log('updateDeviceRoute: $args');
|
||||
|
||||
Reference in New Issue
Block a user