public class Connectivity
extends java.lang.Object
| Constructor and Description |
|---|
Connectivity() |
| Modifier and Type | Method and Description |
|---|---|
static ConnectionInfo |
getConnectionInfo(android.content.Context context)
Check if there is fast connectivity
|
static java.lang.String |
getIPAddress(boolean useIPv4) |
static android.net.NetworkInfo |
getNetworkInfo(android.content.Context context)
Get the network info
|
static java.lang.String |
getNetworkSpeed(int type,
int subType)
Check if the connection is fast
|
static java.lang.String |
getNetworkType(int type,
int subType) |
static boolean |
isConnected(android.content.Context context)
Check if there is any connectivity
|
static boolean |
isConnectedMobile(android.content.Context context)
Check if there is any connectivity to a mobile network
|
static boolean |
isConnectedWifi(android.content.Context context)
Check if there is any connectivity to a Wifi network
|
public static android.net.NetworkInfo getNetworkInfo(android.content.Context context)
context - public static boolean isConnected(android.content.Context context)
context - public static boolean isConnectedWifi(android.content.Context context)
context - type - public static java.lang.String getIPAddress(boolean useIPv4)
public static boolean isConnectedMobile(android.content.Context context)
context - type - public static ConnectionInfo getConnectionInfo(android.content.Context context)
context - public static java.lang.String getNetworkType(int type,
int subType)
public static java.lang.String getNetworkSpeed(int type,
int subType)
type - subType -