public static class NetworkConnection.ConnectionType
extends java.lang.Object
Data | WIFI | Airplane 0 0 1 == 1 1 1 0 == 6 1 0 0 == 4 0 1 0 == 2 0 0 0 == 0
Giving "Data" the first bit positions in order to give room for the future of enabling specific types of data (Edge / 2G, 3G, 4G, LTE, etc) if the device allows it.
Modifier and Type | Field and Description |
---|---|
static NetworkConnection.ConnectionType |
AIRPLANE_MODE |
static NetworkConnection.ConnectionType |
ALL |
static NetworkConnection.ConnectionType |
DATA |
static NetworkConnection.ConnectionType |
NONE |
static NetworkConnection.ConnectionType |
WIFI |
Constructor and Description |
---|
ConnectionType(java.lang.Boolean wifi,
java.lang.Boolean data,
java.lang.Boolean airplaneMode) |
ConnectionType(int mask) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object type) |
int |
hashCode() |
java.lang.Boolean |
isAirplaneMode() |
java.lang.Boolean |
isDataEnabled() |
java.lang.Boolean |
isWifiEnabled() |
java.lang.String |
toJson() |
java.lang.String |
toString() |
public static final NetworkConnection.ConnectionType WIFI
public static final NetworkConnection.ConnectionType DATA
public static final NetworkConnection.ConnectionType AIRPLANE_MODE
public static final NetworkConnection.ConnectionType ALL
public static final NetworkConnection.ConnectionType NONE
public ConnectionType(java.lang.Boolean wifi, java.lang.Boolean data, java.lang.Boolean airplaneMode)
public ConnectionType(int mask)
public java.lang.Boolean isAirplaneMode()
public java.lang.Boolean isWifiEnabled()
public java.lang.Boolean isDataEnabled()
public boolean equals(java.lang.Object type)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toJson()