setConnected

open fun setConnected(connected: Boolean)

Overwrites system connectivity state. To set, use setConnected.

Parameters

connected

flag to determine the connectivity state, true for connected, false for disconnected, and null for ConnectivityManager to determine.