@LevelUpApi(contract=INTERNAL) @ThreadSafe public final class BuildUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static PackageInfo |
getMyPackageInfo(Context context)
Wrapper to obtain the
PackageInfo for the current package. |
static int |
getVersionCode(Context context)
Gets the "versionCode" of the app.
|
static String |
getVersionName(Context context)
Gets the "versionName" of the app.
|
public static int getVersionCode(Context context)
context - Application context.PackageInfo.versionCodepublic static String getVersionName(Context context)
context - Application context.PackageInfo.versionNamepublic static PackageInfo getMyPackageInfo(Context context)
PackageInfo for the current package.context - Application context.