Hello Friends,
Today I have discussed about how to see your version number programmatically in android.
This are the simple code developing android application version name.
And this code given below. So see this code.
try {
packageInfo = getPackageManager().getPackageInfo(getPackageName(),0);
strVersionCode = "Version Code: "+ String.valueOf(packageInfo.versionCode);
strVersionName = packageInfo.versionName;
} catch (NameNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
strVersionName = "Cannot load Version!";
}
And this code are very simple code for get version name in android.
I hope this are very helpful code for developing android application.
So enjoyed code.
Today I have discussed about how to see your version number programmatically in android.
This are the simple code developing android application version name.
And this code given below. So see this code.
try {
packageInfo = getPackageManager().getPackageInfo(getPackageName(),0);
strVersionCode = "Version Code: "+ String.valueOf(packageInfo.versionCode);
strVersionName = packageInfo.versionName;
} catch (NameNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
strVersionName = "Cannot load Version!";
}
And this code are very simple code for get version name in android.
I hope this are very helpful code for developing android application.
So enjoyed code.
No comments:
Post a Comment