public static enum Connection.ConnectionType extends Enum<Connection.ConnectionType>
See ConnectivityManager for types supported from the
API level 13 and higher.
| Enum Constant and Description |
|---|
BLUETOOTH
Connection type indicating that the current connection is established trough bluetooth.
|
DUMMY
Connection type indicating that the current connection is dummy.
|
ETHERNET
Connection type indicating that the current connection is established trough ethernet.
|
MOBILE
Connection type indicating that the current connection is established trough common
mobile network (3G, ...).
|
MOBILE_DUN
Connection type indicating that the current connection is established trough mobile
network (DUN traffic).
|
MOBILE_HIPRI
Deprecated.
See
ConnectivityManager.TYPE_MOBILE_HIPRI. |
MOBILE_MMS
Deprecated.
See
ConnectivityManager.TYPE_MOBILE_MMS. |
MOBILE_SUPL
Deprecated.
See
ConnectivityManager.TYPE_MOBILE_SUPL. |
UNAVAILABLE
Connection type indicating that there is no connection currently available.
|
WIFI
Connection type indicating that the current connection is established trough Wi-Fi
network access point.
|
WIMAX
Connection type indicating that the current connection is established trough WiMAX
specific for data connection.
|
| Modifier and Type | Field and Description |
|---|---|
String |
originalName
Original name of this connection type.
|
String |
preferencesKey
The key under which may be this connection type saved within shared preferences.
|
int |
systemConstant
The flag provided by
ConnectivityManager for this connectivity type. |
| Modifier and Type | Method and Description |
|---|---|
static Connection.ConnectionType |
resolve(int systemConstant)
Resolves an instance of ConnectionType according to the given typeId from the
current set of ConnectionType values.
|
static Connection.ConnectionType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Connection.ConnectionType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Connection.ConnectionType UNAVAILABLE
Constant value: -1
public static final Connection.ConnectionType BLUETOOTH
From ConnectivityManager.TYPE_BLUETOOTH
API level 13public static final Connection.ConnectionType DUMMY
From ConnectivityManager.TYPE_DUMMY
API level 13public static final Connection.ConnectionType ETHERNET
From ConnectivityManager.TYPE_ETHERNET
API level 13public static final Connection.ConnectionType MOBILE
From ConnectivityManager.TYPE_MOBILE
public static final Connection.ConnectionType MOBILE_DUN
From ConnectivityManager.TYPE_MOBILE_DUN
@Deprecated public static final Connection.ConnectionType MOBILE_HIPRI
ConnectivityManager.TYPE_MOBILE_HIPRI.
From ConnectivityManager.TYPE_MOBILE_HIPRI
@Deprecated public static final Connection.ConnectionType MOBILE_MMS
ConnectivityManager.TYPE_MOBILE_MMS.
From ConnectivityManager.TYPE_MOBILE_MMS
@Deprecated public static final Connection.ConnectionType MOBILE_SUPL
ConnectivityManager.TYPE_MOBILE_SUPL.
From ConnectivityManager.TYPE_MOBILE_SUPL
public static final Connection.ConnectionType WIFI
From ConnectivityManager.TYPE_WIFI
public static final Connection.ConnectionType WIMAX
From ConnectivityManager.TYPE_WIMAX
public final int systemConstant
ConnectivityManager for this connectivity type.public final String originalName
public final String preferencesKey
public static Connection.ConnectionType[] values()
for (Connection.ConnectionType c : Connection.ConnectionType.values()) System.out.println(c);
public static Connection.ConnectionType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static Connection.ConnectionType resolve(int systemConstant)
systemConstant - An id (systemConstant) of the the desired connection type
to resolve.UNAVAILABLE if there
is no connection type with the requested constant.