private String getVersionName(){
PackageManager packageManager = getPackageManager();
try {
PackageInfo packageInfo = packageManager.getPackageInfo(getPackageName(), 0);
int versionCode=packageInfo.versionCode;
String versionName=packageInfo.versionName;
System.out.println("versionCode="+versionCode+";versionName="+versionCode);
return versionName;
} catch (NameNotFoundException e) {
e.printStackTrace();
}
return "" ;