开发者

Turn Internet connection on

It is possible to active WiFi or mobile internet at the backend from one application? I create an application which needs Internet access. The app should check the Internet connection when i开发者_JS百科t starts. If there is no connection, then turn WiFi or mobile Internet connection on.

Is this possible?

I use the ConnectiveManager to check connectivity state.


You can use setWifiEnabled() to change the wifi state.

If there are no wifi networks configured, it should automatically use the data network if any. Use the ConnectivityManager to check if there are any data networks.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜