I'm getting wifi connection info this way:
WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
WifiInfo info = wifiManager.getConnectionInfo();
But, could getConnectionInfo
method return null
in any case? Android documentation reference say this:
Return dynamic information about the current Wi-Fi connection, if any is active.
I guess if the device is not connected to any network it will return null
, won't it?
Thanks