Reputation: 4781
Is there a simple way to find the current version of my application from within it? I would like to add the version string to the about screen.
Upvotes: 23
Views: 7461
Reputation: 15
please try out this.
PackageInfo pInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
version = pInfo.versionName;
Upvotes: 2