开发者

Android - Get Notified when a new access point is added?

开发者 https://www.devze.com 2022-12-31 22:32 出处:网络
I was wondering is it possible to get a notification of when a new configured network is added to the WifiManager in Android?

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 achi开发者_Python百科eved?


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消