Android - 添加新接入点时收到通知吗?

发布于 2024-09-02 21:46:58 字数 359 浏览 3 评论 0原文

我想知道当新配置的网络添加到 Android 中的 WifiManager 时是否可以收到通知?

我知道您可以获取已配置网络的当前列表

getConfiguredNetworks

但是是否有可能在添加新网络时收到通知?

我在 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

getConfiguredNetworks

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

雨后彩虹 2024-09-09 21:46:58

您是否尝试过为 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.

℡Ms空城旧梦 2024-09-09 21:46:58

有一个很好的示例说明如何使用通知栏并使用通知:
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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文