views:

37

answers:

1

Hi,

the AndroidManifest.xml contains the version name of the application, something like

android:versionName="1.0"

Now the question - is it somehow possible to access this version name in the source code, so that I can display it for example in an About Dialogue?

thanks in advance,

Martin

+2  A: 
String version = getPackageManager().getPackageInfo(getPackageName(), 0).versionName;
Konstantin Burov