setConnected

open fun setConnected(connected: Boolean)

Manually sets the connectivity state of the app. This is useful for apps which control their own connectivity state and want to bypass any checks to the ConnectivityManager.

Parameters

connected

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