NetworkSettings

data class NetworkSettings(var allowMetered: Boolean, var allowRoaming: Boolean) : Parcelable

Class containing information about network settings

Constructors

Link copied to clipboard
Link copied to clipboard
fun NetworkSettings(allowMetered: Boolean, allowRoaming: Boolean)

Functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)

Properties

Link copied to clipboard

true if metered networks are allowed, false otherwise

Link copied to clipboard

true if using roaming network is allowed, false otherwise By default, both values are true which means any type of network is used If you want to disable mobile network and use only Wifi network, set allowMetered flag to false