简体   繁体   English

如何在android 4.0中启动wifi AP设置意图?

[英]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.

相关问题 在Android 4.0、4.1、4.2上,如何以编程方式打开android Ap或通过代码转到“设置”->“更多...->便携式Wi-Fi热点”? - On Android 4.0, 4.1, 4.2, how to open android Ap progmatically or Go to Settings->More…->Portable Wi-Fi hotspot by code? 如何将意图传递给 wifi 的设置应用程序 - How to pass intent to settings app for wifi Android 2.X设备可以连接到Android 4.0 Wifi Direct AP吗? - Can Android 2.X devices connect to an Android 4.0 Wifi Direct AP? 在 Android 中以编程方式连接到 Wifi AP - Connecting to Wifi AP programmatically in Android Android:如何扫描WiFi,连接到AP然后建立TCP连接? - Android: How to Scan WiFi, Connect to an AP and then Establish a TCP Connection? 如何查找连接到Wifi AP的用户数(Android) - How to Find the Number of Users Connected to a Wifi AP (Android) 如何知道连接到当前 Wifi AP 的设备数量(Android 和 iOS) - How to know the number of devices connecting to current Wifi AP (Android & iOS) Android如何选择wifi AP - How androids select wifi AP Android app 忽略 Raspberry PI Wifi AP。如何将 Android App 连接到非 inte.net Wifi.network? - Android app ignore Raspberry PI Wifi AP.How to connect Android App to non internet Wifi network? 如何使用 Xamarin (C#) 在 Android 上启用 Wifi Zone (Wifi AP)? - How Can I Enable The Wifi Zone (Wifi AP) On Android Using Xamarin (C#)?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM