检索应用程序版本
public String getAppVersion() throws PackageManager.NameNotFoundException {
PackageManager manager = getApplicationContext().getPackageManager();
PackageInfo info = manager.getPackageInfo(
getApplicationContext().getPackageName(),
0);
return info.versionName;
}