//应用版本号
public String getVersionName() { String versionName = ""; PackageManager packageManager = getPackageManager(); try { PackageInfo packageInfo = packageManager.getPackageInfo(getPackageName(), 0); versionName=packageInfo.versionName; } catch (NameNotFoundException e) { e.printStackTrace(); } return versionName; }
android.os.Build.VERSION.RELEASE获取版本号
android.os.Build.MODEL 获取手机型号