public class AppUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BUILD_TYPE_DEBUG |
static java.lang.String |
BUILD_TYPE_RELEASE |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getApkBuildType(android.content.Context context)
Get app build type
|
static java.lang.String |
getAppId(android.content.Context context)
Get app id
|
static java.lang.String |
getAppName(android.content.Context context)
Get app name
|
static java.lang.String |
getBriefCPUInfo()
Get brief cpu info
|
static java.lang.String |
getCPUHardwareInfo()
Get CPU hardware name
|
static java.lang.String |
getCPUProcessorArchInfo()
Get cpu processor name
|
static java.lang.String |
getDeviceId(android.content.Context context)
Get android device unique id
|
static java.lang.String |
getDeviceInfo()
Get detailed device info
|
static java.lang.String |
getFullCPUInfo()
Get full cpu info
|
static int |
getPackageVersionCode(android.content.Context context)
Get package version code
|
static java.lang.String |
getPackageVersionName(android.content.Context context)
Get package version name
|
static java.lang.String |
getSpecificCpuInfoByKey(java.lang.String key)
Get specific cpu info by key.
|
static boolean |
isNativeLibraryExists(android.content.Context context,
java.lang.String lib)
Check if native library exists
|
static boolean |
isNetworkAvailable(android.content.Context context)
Get android device network status
|
static java.util.ArrayList<java.lang.String> |
readFromCpuInfo()
Read from cpuinfo file
|
public static final java.lang.String BUILD_TYPE_DEBUG
public static final java.lang.String BUILD_TYPE_RELEASE
public static java.lang.String getAppName(android.content.Context context)
context
- android contextpublic static java.lang.String getAppId(android.content.Context context)
context
- android contextpublic static java.lang.String getApkBuildType(android.content.Context context)
context
- android contextpublic static java.lang.String getPackageVersionName(android.content.Context context)
context
- android contextpublic static int getPackageVersionCode(android.content.Context context)
context
- android contextpublic static java.lang.String getDeviceId(android.content.Context context)
context
- android contextpublic static java.lang.String getFullCPUInfo()
public static java.lang.String getBriefCPUInfo()
public static java.lang.String getCPUProcessorArchInfo()
public static java.lang.String getCPUHardwareInfo()
public static java.lang.String getSpecificCpuInfoByKey(java.lang.String key)
key
- cpu info keypublic static java.util.ArrayList<java.lang.String> readFromCpuInfo()
public static java.lang.String getDeviceInfo()
public static boolean isNetworkAvailable(android.content.Context context)
context
- android contextpublic static boolean isNativeLibraryExists(android.content.Context context, java.lang.String lib)
context
- android contextlib
- library name, such as: liball_in_one.so