I know how to check if wifi is enabled or not.
Code:
WifiManager wifi = (WifiManager)getSystemService(Context.WIFI_SERVICE);
if(wifi.isWifiEnabled())
{
//Code execution comes here
}
But how to find out if the user is actually connected to a nearby wifi network (or any wifi network for that matter)?
EDIT: I mean to ask, say if a user has logged in to a wifi network after typing in a password, then only would he be able to use that wifi. So is there anyway to check if has connected (logged in) to any wifi network?