[英]how to start the wifi AP settings intent in android 4.0?
My android 4.0 emulation device seems doesn't have a wifi ap settings activity and i can't find it in the given android docs how do i can provide an intent to start the wifi ap settings? 我的android 4.0仿真设备似乎没有wifi ap设置活动,我无法在给定的android文档中找到它,我该如何提供启动wifi ap设置的意图?
for example i can start my wifi settings like this: 例如,我可以像这样启动我的wifi设置:
Intent intent = new Intent(Settings.ACTION_WIFI_SETTINGS);
startActivity(intent);
and when it comes to wifiap settings? 至于wifiap设置?
I believe you can't use an intent to start the Wifi AP (ie tethering) activity. 我相信您不能使用意图来启动Wifi AP(即网络共享)活动。
I tried to find something I while back and tried a few suggestions I found, but couldn't get anything to work. 我试图找到自己回来的东西,并尝试了一些发现的建议,但无济于事。
You can try following code for WiFi Connection in Android. 您可以尝试在Android中使用以下代码进行WiFi连接。
WifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE);
wifi.setWifiEnabled(enabled);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.