|
搜索和连接如下,却发现连接已经成功,用getblestatus()获取到的状态却不成功,甚至返回“未连接到蓝牙设备”
bluetooth1.SearchBle(xx, xx, xx, (abj, args) =>
{
bluetooth1.ConnectBle(args.MacAddress, xx, xx, xx, (abjj, argsj) =>
{
if (argsj.isError == true)
{
Toast(argsj.error);
}
else
{
bluetooth1.GetBleStatus((abjc, argsc) =>
{
if (argsc.isError == true)
{
Toast(argsc.error);
}
else
{
if (argsc.Status == Smobiler.Plugins.BluetoothStatus.Connected)
{
this.button1.Text = "在线";
}
}
});
}
});
});
|
|