I don\'t want my user to even try downloading something unless they have Wi-Fi connected. However, I can only seem to be able to tell if Wi-Fi is enabled, but they could sti
val wifi = context!!.applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager?
if (wifi!!.isWifiEnabled)
//do action here
else
//do action here