WifiManager 的removeNetwork 并非如此。真正删除wifi网络
我在应用程序中使用removeNetwork 来删除已配置的网络。当我执行这个方法时,一切都会按预期进行。 wifi 断开连接,并且 SSID 不会出现在配置的网络列表中...直到我禁用并重新启用 wifi 无线电。此时,SSID 重新出现,android 自动连接到 AP。
有人知道这是怎么回事吗?
谢谢。
I'm using removeNetwork in my application to remove a configured network. When I execute this method, everything acts as it should. The wifi disconnects and the SSID doe not appear in the list of configured netowrks... that is until i disable and re-enable the wifi radio. At this point, the SSID reappears and android automatically connects to the AP.
Does anybody know what's going on here?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试过调用 SaveConfiguration() 删除网络后的方法?
根据文档,您必须调用它才能使您所做的更改持续存在。
希望这有帮助!
Have you tried calling the SaveConfiguration() method after removing a network ?
According to documentation, you have to call it in order for the changes you've made to persist.
Hope this helps !