Android - 添加新接入点时收到通知吗?
我想知道当新配置的网络添加到 Android 中的 WifiManager 时是否可以收到通知?
我知道您可以获取已配置网络的当前列表
但是是否有可能在添加新网络时收到通知?
我在 WifiManager 中没有看到任何有帮助的内容。
还有其他想法吗?或者深入了解如何实现这一目标?
I was wondering is it possible to get a notification of when a new configured network is added to the WifiManager in Android?
I know you can get the current list of configured networks
But is it possible to get notification of when a new one is added?
I dont see anything in the WifiManager that would be helpful.
Has anyone any other ideas? Or insight into how this could be achieved?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否尝试过为
NETWORK_IDS_CHANGED_ACTION< 设置广播接收器/代码>
?我刚刚浏览了一些 WifiManager 源代码 和 Settings.git 源代码 看起来这可能可以解决问题。不过我自己还没有尝试过。
Have you tried setting up a broadcast receiver for
NETWORK_IDS_CHANGED_ACTION
? I just looked through some of the WifiManager source code and Settings.git source code and it seems like that might do the trick. I haven't tried myself, though.有一个很好的示例说明如何使用通知栏并使用通知:
http://www.firstdroid.com /2010/05/09/learn-by-example-using-notification-bar/
也许这可以帮助你。
There is a good example of how to use the Notification bar, and play with the notification in:
http://www.firstdroid.com/2010/05/09/learn-by-example-using-notification-bar/
Maybe this can help you.