-2

You Guys have any idea how to get the Build Version of a third Party app Programmatically?

  • possible duplicate of [Get application version programatically in android](http://stackoverflow.com/questions/6593592/get-application-version-programatically-in-android) – Andrew T. Aug 25 '14 at 07:57
  • No the other question is considering the Problem to get the app's Version number, however not the Version number of a third Party app – Ferdinand Guggenberger Aug 25 '14 at 08:06
  • It's the same, you need to change `getPackageName()` to the package name you want to check though. – Andrew T. Aug 25 '14 at 08:12
  • possible duplicate of [How to get the build/version number of your android application?](http://stackoverflow.com/questions/4616095/how-to-get-the-build-version-number-of-your-android-application) – Peter O. Aug 26 '14 at 03:45

1 Answers1

0

You can use PackageInfo.versionName to get 3rd party app's version.
My example:

List<PackageInfo> packages = getPackageManager().getInstalledPackages(0);
for (PackageInfo packageInfo : packages) {
    System.out.println(packageInfo.versionName);
}
PageNotFound
  • 2,320
  • 2
  • 23
  • 34