How to make UWP can auto collect UUID or GUID?

45 Views Asked by At

I create a new UWP project, and then I want it can pair and connect bluetooth device, but every time I try to test my appliaction, it always need me copy and paste UUID or GUID from bluetooth device, So, I want to aske How can I make UWP application auto collect UUID or GUID? Thank you.

 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;
 }
0

There are 0 best solutions below