Android Utililty Methods APK Information Get

List of utility methods to do APK Information Get

Description

The list of methods to do APK Information Get are organized into topic(s).

Method

intgetAppVersionCode(Context context)
get App Version Code
PackageInfo appPackage = getAppPackage(context);
return appPackage.versionCode;
StringgetAppVersionName(Context context)
get App Version Name
PackageInfo appPackage = getAppPackage(context);
return appPackage.versionName;
DrawablegetApkIcon(Context context, String apkPath)
get Apk Icon
PackageManager pm = context.getPackageManager();
try {
    PackageInfo info = pm.getPackageArchiveInfo(apkPath,
            PackageManager.GET_ACTIVITIES);
    if (info != null) {
        ApplicationInfo appInfo = info.applicationInfo;
        appInfo.sourceDir = apkPath;
        appInfo.publicSourceDir = apkPath;
...