I have an eclipse project with two included library projects. These projects have their own manifest files with version information. Now I want to read the version number from these library projects within my main project. The information can't be read by calling the PackageManager:
//Get the version name from the included library project String libVersion = getPackageManager().getPackageInfo("com.google.zxing.client.android", 0).versionName; Because the library is not an installed application. But what's the right way to get these information?
For instance: I have included zxing Android project as library project. These Project has following version information in its manifest file:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.google.zxing.client.android" android:installLocation="auto" android:versionCode="88" android:versionName="4.3.2" > I want to read versionCode and versionName. If I use packageManager like in the coding above, I will get versionCode "93" and versionName "4.5".