I'd like my android device to connect to a wifi hotspot.
I created a new wificonfiguration
and add it into the wifimanager
, this wificonfiguration
has NetworkId
.Then I invoke the function wifi.enableNetwork(NetworkId, true).
After that, I think the supplicant will go through obtaining ip address, authentication, and at last physically connect to the hotspot. So is there a way to identify if the wifi is physically connected or not?
I would prefer a handler-like method.