In the Android manifest file, there is a field that specifies the application version.
How I can read that value programmatically?
try {
final String packageName = context.getPackageName();
PackageInfo packageInfo = context.getApplicationContext().getPackageManager().getPackageInfo(packageName, 0);
final int iconid = packageInfo.applicationInfo.icon; // for example
// etc
} catch (android.content.pm.PackageManager.NameNotFoundException e) {}