List of utility methods to do APK Version Get
String | GetVersion(Context context) Get Version try { PackageInfo manager = context.getPackageManager() .getPackageInfo(context.getPackageName(), 0); return manager.versionName; } catch (NameNotFoundException e) { return "Unknown"; |
String | getAppVersion(Context context) get App Version try { return context.getPackageManager().getPackageInfo( context.getPackageName(), 0).versionName; } catch (Exception e) { throw new RuntimeException(e); |