启用Wi-Fi和蓝牙编程 [英] Enable Wi-Fi and Bluetooth programmatically
本文介绍了启用Wi-Fi和蓝牙编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要写2buttons的处理程序启用/禁用WiFi和蓝牙。现在,我只能看到手机设置页面,在这里我可以手动更改启用/禁用WiFi和蓝牙。 ?所以,我怎么能做到这一点编程
代码为Wi-Fi:
ConnectionSettingsTask connectionSettingsTask =新ConnectionSettingsTask();
connectionSettingsTask.ConnectionSettingsType = ConnectionSettingsType.WiFi;
connectionSettingsTask.Show();
解决方案
不是显示了WIFI /蓝牙设置页面等,你不能做任何事情。
用户必须然后切换按钮。
I need write handlers of 2buttons to enable/disable wifi and bluetooth. Now, I can only see phone settings page, where I can change enable/disable wifi and bluetooth manually. So, how can I do it programmatically?
Code for Wi-Fi:
ConnectionSettingsTask connectionSettingsTask = new ConnectionSettingsTask();
connectionSettingsTask.ConnectionSettingsType = ConnectionSettingsType.WiFi;
connectionSettingsTask.Show();
解决方案
other than showing the wifi / Bluetooth settings page, you cannot do anything else.
the user has to then toggle the button.
这篇关于启用Wi-Fi和蓝牙编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文