public class NetworkUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static android.net.NetworkInfo |
getNetworkInfo(android.content.Context context)
Get the network info
|
static boolean |
isConnected(android.content.Context context)
Check if there is any connectivity
|
static boolean |
isConnectedFast(android.content.Context context)
Check if there is fast 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
|
static boolean |
isConnectionFast(int type,
int subType)
Check if the connection is fast
|
public static android.net.NetworkInfo getNetworkInfo(android.content.Context context)
context
- the contextpublic static boolean isConnected(android.content.Context context)
context
- the contextpublic static boolean isConnectedFast(android.content.Context context)
context
- the contextpublic static boolean isConnectedMobile(android.content.Context context)
context
- the contextpublic static boolean isConnectedWifi(android.content.Context context)
context
- the contextpublic static boolean isConnectionFast(int type, int subType)
type
- the typesubType
- the sub type