移动热点的更改配置 [英] Change Configuration of mobile Hotspot
本文介绍了移动热点的更改配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想运行一个新的名字和开放的可访问性的热点。
I'm trying to run a hotspot with a new name and open accessibility.
wifiConfig.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.OPEN);
wifiConfig.SSID = "\"MySSID\"";
wifiConfig.networkId = 1;
methodNum = getMethodNumber("setWifiApEnabled");
try {
wmMethods[methodNum].invoke(wifiManager, wifiConfig, true);
} catch (IllegalArgumentException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (IllegalAccessException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (InvocationTargetException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
我得到正确的方法,它好像它开始的热点在手机上, 但是配置并不改变。
I get the right method and it seems like it starts the hotspot on the phone, but the configuration doesn't change.
我试图让与getWifiApConfiguration当前的配置数据 而我什么也没有用了,没有SSID,而不是当前的加密。
I tried to get the current configuration data with getWifiApConfiguration and i get nothing with it, no ssid and not the current encryption.
我使用的是HTC EVO 3D的调试。
I'm using HTC Evo 3d for the debugging.
推荐答案
这似乎是它的一个与宏达电的问题。 我的一些朋友尝试了HTC等设备类似code。没有工作的HTC,在工作的人。
It seems like its a problem with HTC. Some of my friends tried similar code on HTC and other devices. Didnt work on HTC, worked on the others.
这篇关于移动热点的更改配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文