Vicky Bhatt Vicky Bhatt - 2 years ago 205
C# Question

how to enable Bluetooth of windows 10 laptop using

I have already find most of all the website related to this question but not getting a good answer that help me out

So please help me out in that case I really don't know how to enable Bluetooth turn on in windows 10 laptop

I am using Windows platform I am creating app for only windows laptop and i want to start Bluetooth using my app if Bluetooth is not started


Answer Source

You can enable the radio's using the following snippet if you're using the Universal Windows Platform

var result = await Radio.RequestAccessAsync();
if (result == RadioAccessStatus.Allowed)
     var bluetooth = (await Radio.GetRadiosAsync()).FirstOrDefault(radio radio.Kind == RadioKind.Bluetooth);
    if (bluetooth != null && bluetooth.State != RadioState.On)
    await bluetooth.SetStateAsync(RadioState.On);

but not knowing what platform you're using specifically there's no way to tell

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download