Hasham
Hasham

Reputation: 21

Bypassing connect bluetooth device permission in c# with windows 10

Context: I'm working on a Windows 10 app that will allow users to quickly connect to a Bluetooth device. Because the native API is difficult to work with, I'm using the 'In The Hand' library. Anyway, back to the point: whenever I make a connect request. Before allowing me to connect, I receive this Pair a device notification.

I'm wondering if I can set Windows to automatically accept this permission for connecting the device. Is there a method in the Windows API that I can use to accomplish this?

Here is the link to the code: https://github.com/hasham7861/bluetooth-le-experiment/blob/master/Program.cs

In the picture I make a connect request to a bluetooth headset and then I get the notification on the bottom right, and only if I click allow to pair device then it pairs the device. enter image description here

Upvotes: 1

Views: 673

Answers (1)

CMLEE
CMLEE

Reputation: 23

I hope this link helps you. I apologize in advance if I misunderstood the question or if the data were meaningless

Windows 10 Connect to Bluetooth Classic Device without Pairing

https://github.com/microsoft/Windows-universal-samples/blob/main/Samples/DeviceEnumerationAndPairing/cs/Scenario9_CustomPairDevice.xaml.cs

Upvotes: 1

Related Questions