Android獲取應用程序的版本信息
String name = null;
try {
PackageManager pm = mContext.getPackageManager();
PackageInfo info = pm.getPackageInfo("tv.cngolf.vplayer", 0);
name = info.versionName;
} catch (NameNotFoundException e) {
e.printStackTrace();
}
更多Android相關信息見Android 專題頁面 http://www.linuxidc.com/topicnews.aspx?tid=11