NetworkState

open class NetworkState
kotlin.Any
   ↳ androidx.work.impl.constraints.NetworkState

Stores information about network state.

Summary

Public constructors
NetworkState(isConnected: Boolean, isValidated: Boolean, isMetered: Boolean, isNotRoaming: Boolean)

Public methods
open Boolean
equals(other: Any?)

open Int

open Boolean

Determines if the network is connected.

open Boolean

Determines if the network is metered.

open Boolean

Determines if the network is not roaming.

open Boolean

Determines if the network is validated - has a working Internet connection.

open String

Public constructors

NetworkState

NetworkState(
    isConnected: Boolean,
    isValidated: Boolean,
    isMetered: Boolean,
    isNotRoaming: Boolean)

Public methods

equals

open fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

isConnected

open fun isConnected(): Boolean

Determines if the network is connected.

Return
Boolean true if the network is connected.

isMetered

open fun isMetered(): Boolean

Determines if the network is metered.

Return
Boolean true if the network is metered.

isNotRoaming

open fun isNotRoaming(): Boolean

Determines if the network is not roaming.

Return
Boolean true if the network is not roaming.

isValidated

open fun isValidated(): Boolean

Determines if the network is validated - has a working Internet connection.

Return
Boolean true if the network is validated.

toString

@NonNull open fun toString(): String