检查WiFi和GPS isConnected或不在Android的? [英] Check WiFi and GPS isConnected or Not in Android?

查看:179
本文介绍了检查WiFi和GPS isConnected或不在Android的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要检查无线在手机上或关闭在运行时?

I would need to check the wifi is on or off in the phone at the runtime?

如果没有连接,我想显示对话框,转到直接设置/无线控制由用户来启用它。

if it is not connected, i want to show dialog and goto directly Setting/Wireless Controls to enable it by user.

其WiFi和 GPS手机的居留制。怎么做?其意图唤醒这个?你知道吗?

its for both wifi and Gps staus of the phone. How to do it? which intent to wake for this? Any idea?

推荐答案

您可以使用 WifiManager 类获得了Wi-Fi状态。

You can use the WifiManager class to get the state of Wi-Fi.

请参阅<一href="http://stackoverflow.com/questions/2318310/how-can-i-call-wi-fi-settings-screen-from-my-application-using-android">this问题打开Wi-Fi设置。而这个问题的 GPS 的状态。

See this question for opening Wi-Fi settings. And this question for GPS status.

这篇关于检查WiFi和GPS isConnected或不在Android的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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