-
Notifications
You must be signed in to change notification settings - Fork 17
Is it possible to support WifiManager.NETWORK_STATE_CHANGED_ACTION? #5
Comments
You mean when someone connects or disconnects from our AP? |
Nah, this is for when the device with the AP running either enables or disables the AP. I misspoke in the original description by referring to it as "connects/disconnects". Sorry for the confusion. |
I am guessing you also want to be notified whenever the AP is enabled or disabled by the user, not only the library. I can't find any callback system in Android to do such a thing. So we have two options:
I'm guessing the second is the best option. After all, this library is already hacky enough, with the reflection and all. Adding a callback system that internally polls should be fine, if we let the app define how often to poll (with a default to e.g. 1s) and as long as we don't do the polling work if no watchers are registered. |
Isn't this what you are looking for?
|
@luispereira maybe - the docs say:
I don't have time to work on this at the moment, but will review a patch. |
Since there seems to be little interest to write this, I'm going to close this issue for now as I don't intend to work on it myself. Feel free to reopen or comment if you'd like to work on it. |
This may be a long shot, and I am currently not able to think of a specific way to implement this, but can anybody think of a way to support broadcasting a
WifiManager.NETWORK_STATE_CHANGED_ACTION
intent when the WiFi AP gets enabled or disabled?This is the way that the
WifiManager
currently notifies Android apps that they have gained or lost access to a wireless network. It would be extremely helpful to be able to be notified when a WiFi AP is connected to or disconnected from.There may or may not be some underlying events/broadcasts that can be retrieved via, e.g.
BroadcastReceivers
or maybe some lower level thing which is only accessible via reflection that I'm unware of.The text was updated successfully, but these errors were encountered: