isConnectedToMobileNetwork

fun Context.isConnectedToMobileNetwork(): Boolean

Check if the device is connected to mobile data, vs. Wi-Fi.

Return

true if the device is using mobile data, false if on Wi-Fi or disconnected.