如何在 WP7 上以编程方式打开/关闭 WiFi [英] How can I turn on/off WiFi programatically on WP7

查看:39
本文介绍了如何在 WP7 上以编程方式打开/关闭 WiFi的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有可能以编程方式打开和关闭 wifi.我的想法是让后台任务寻找地理坐标并切换 wifi 设置,无论手机是否在以前保存的位置范围内.

I would like to know if there is any possibility to turn wifi on and off programatically. My idea is to have a background task looking for geocoordinates and toggle the wifi settings wether the phone is in the range of a former saved location or not.

然而,我看到的一切都是获取 wifi 状态并快速跳转到 wifi 设置的应用程序.我想实现一个自动化程度更高的应用,以帮助节省电池电量.

Yet everything I saw were apps which get the state of the wifi and quick jump to the wifi settings. I would like to implement a more automated app which helps saving battery power.

推荐答案

抱歉,您无法以编程方式打开或关闭 wifi.最好的办法是显示WIFI设置页面,让用户自行处理.

Sorry, you can't programmatically turn on or off the wifi. The best you can do is displaying the WIFI settings page and let the user take care of it.

这篇关于如何在 WP7 上以编程方式打开/关闭 WiFi的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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