提问人:xxyyuuu 提问时间:11/18/2023 更新时间:11/18/2023 访问量:25
如何使UWP可以自动收集UUID或GUID?
How to make UWP can auto collect UUID or GUID?
问:
我创建了一个新的 UWP 项目,然后我希望它可以配对和连接蓝牙设备,但每次我尝试测试我的应用程序时,它总是需要我从蓝牙设备复制和粘贴 UUID 或 GUID,所以,我想问如何让 UWP 应用程序自动收集 UUID 或 GUID? 谢谢。
private async void LoadPairedDevicesAsync()
{
PairedDevices.Clear();
var devices = await DeviceInformation.FindAllAsync(BluetoothDevice.GetDeviceSelector());
foreach (var device in devices)
{
PairedDevices.Add(device);
}
// Notify the UI that the collection has changed
PairedDevicesListView.ItemsSource = null;
PairedDevicesListView.ItemsSource = PairedDevices;
}
答: 暂无答案
评论