Created
February 11, 2013 18:27
-
-
Save jschmid/4756433 to your computer and use it in GitHub Desktop.
Get android version code and version name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PackageManager manager = this.getPackageManager(); | |
PackageInfo info = manager.getPackageInfo(this.getPackageName(), 0); | |
Toast.makeText(this, | |
"PackageName = " + info.packageName + "\nVersionCode = " | |
+ info.versionCode + "\nVersionName = " | |
+ info.versionName + "\nPermissions = " + info.permissions, Toast.LENGTH_SHORT).show(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment