In ANDROID applications, we often need to display the program name and version number in the Application Introduction and description. Of course, we can write it directly in the code using hard encoding, but it is not very convenient to change every version upgrade. So how can I read the name and version number of the ANDROID app? Www.2cto.com is actually very simple. There is a Package Manager in the ANDROID system, and we will use it to complete this task. [Java] PackageInfo pkg = getPackageManager (). getPackageInfo (getApplication (). getPackageName (), 0); String appName = pkg. applicationInfo. loadLabel (getPackageManager ()). toString (); String versionName = pkg. versionName; appName is the name of the ANDROID application. VersionName is the current version number of the ANDROID application. It corresponds to the versionName attribute in the AndroidManifest. xml file.