wpf应用程序中的蓝牙配对。 [英] Bluetooth pairing in wpf application.

查看:870
本文介绍了wpf应用程序中的蓝牙配对。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个wpf应用程序,它将在Windows 10的kiosk模式下运行。我的应用程序将通过流媒体提供音频播放功能,并且需要监听蓝牙耳机。我可以使用
32feet.net库向我的蓝牙耳机发送配对请求,但是Windows 10会提示用户"点击添加设备"。点击重定向到设置页面以允许设备连接。由于应用程序需要在kiosk模式下运行,因此用户不应与窗口设置和功能进行交互。
如何在没有用户互动的情况下绕过点击添加设备选项并成功配对蓝牙耳机?

I am developing a wpf application which will run under kiosk mode in windows 10. My application will provide an audio playing feature via streaming and to listen a bluetooth headset is required. I am able to send pairing request to my bluetooth headset using 32feet.net library but windows 10 prompts user to "Tap to add device" and upon tapping redirects to settings page to allow device to connect. As the application requires to be run in kiosk mode no user should interact with window settings and features. How can I bypass the tap to add device option and undergo successfull pairing of bluetooth headset without user interaction?

推荐答案

您好,

试试这个:我 实现Windows自动配对:

Try this: to implement Windows Auto Pairing:

EventHandler<BluetoothWin32AuthenticationEventArgs> handler = new EventHandler<BluetoothWin32AuthenticationEventArgs>(this.handleRequests);
            BluetoothWin32Authentication authenticator = new BluetoothWin32Authentication(handler);

public void handleRequests(Object thing, BluetoothWin32AuthenticationEventArgs args)
{
    args.Confirm = true;
}

由于 32feet.NET 是超出此论坛支持范围的第三方来源。我将把你的主题转移到非主题论坛。

Since 32feet.NET is the third-party source which is outside of this forum scope of support. I will move your thread to off-topic forum.

感谢您的理解。

最佳 问候,

Best Regards,

Bob

这篇关于wpf应用程序中的蓝牙配对。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆