Android Get Status Of Wifi Connection
I'm currently using NetworkRequest and NetworkCallback approach (recommended by Google official) to get status of Wifi connection, and it works partially. I'm expecting the onUnava
Solution 1:
Ok, I got the solution:
val isWifiOn = with(getConnectivityManager()) {
getNetworkCapabilities(activeNetwork)?.hasTransport(NetworkCapabilities.TRANSPORT_WIFI)
}
Post a Comment for "Android Get Status Of Wifi Connection"