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