How to get the version name from the AndroidManifest.xml file

Use the following code snip in your application:

try
{
    String VersionName = this.getPackageManager().getPackageInfo(this.getPackageName(), 0).versionName;
}
catch (NameNotFoundException e)
{
    Log.v(tag, e.getMessage());
}

Leave a Reply

Your email address will not be published. Required fields are marked *