我怎么能在Windows中启用手机蓝牙8蓝牙检查的确定停用后 [英] How could i enable bluetooth in Windows phone 8 After Checking Disbale of Bluetooth
问题描述
我要检查蓝牙是否开启。
如果蓝牙未启用的手段,我将提出一个弹出说(允许蓝牙上(是/否))基于一个响应,我需要继续。
i want to check whether bluetooth is enabled or not. If bluetooth is not enabled means i will ask one popup says(Allow the bluetooth to on (yes/no)) Based one the response I need to proceed.
如果用户pressed是意味着我怎么可能启用蓝牙的Windows Phone 8设备。
没有重定向到蓝牙页面。
If user pressed Yes means how could i enabled bluetooth in windows phone 8 device. without redirecting to the bluetooth page.
我试图寻找这个<一个href=\"http://stackoverflow.com/questions/15895884/how-can-i-know-bluetooth-is-enabled-or-not-on-windows-phone-8\">thread
推荐答案
您不能直接从code启用蓝牙,但相反,你可以使用 ConnectionSettingsTask带给用户的蓝牙设置页面
启动:
You cannot directly enable Bluetooth from code, but instead, you can bring the user to the Bluetooth setting page by using ConnectionSettingsTask
launcher:
ConnectionSettingsTask connectionSettingsTask = new ConnectionSettingsTask();
connectionSettingsTask.ConnectionSettingsType = ConnectionSettingsType.Bluetooth;
connectionSettingsTask.Show();
更多关于发射器和选择器的这里。
More about Launchers and Choosers here.
蓝牙设置页面,也可以使用URI方案启动:
The Bluetooth settings page can also be launches using a URI scheme:
Windows.System.Launcher.LaunchUriAsync(new Uri("ms-settings-bluetooth:"));
查看更多这里
这篇关于我怎么能在Windows中启用手机蓝牙8蓝牙检查的确定停用后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!